nats-io/nats-server · error

processRoutedHeaderMsgArgs Bad or Missing Reply Indicator: '

Error message

processRoutedHeaderMsgArgs Bad or Missing Reply Indicator: '%s'

What it means

In the >5-token branch of processRoutedHeaderMsgArgs, args[2] must be the single-character reply indicator ('+' or '|'); the check len(args[2]) != 1 failed, so the token layout is misaligned — an optional reply subject or queue-name list was present/absent inconsistently with what the sender encoded.

Source

Thrown at server/route.go:332

		return fmt.Errorf("processRoutedHeaderMsgArgs Parse Error: '%s'", args)
	case 4:
		c.pa.reply = nil
		c.pa.queues = nil
		c.pa.hdb = args[2]
		c.pa.hdr = parseSize(args[2])
		c.pa.szb = args[3]
		c.pa.size = parseSize(args[3])
	case 5:
		c.pa.reply = args[2]
		c.pa.queues = nil
		c.pa.hdb = args[3]
		c.pa.hdr = parseSize(args[3])
		c.pa.szb = args[4]
		c.pa.size = parseSize(args[4])
	default:
		// args[2] is our reply indicator. Should be + or | normally.
		if len(args[2]) != 1 {
			return fmt.Errorf("processRoutedHeaderMsgArgs Bad or Missing Reply Indicator: '%s'", args[2])
		}
		switch args[2][0] {
		case '+':
			c.pa.reply = args[3]
		case '|':
			c.pa.reply = nil
		default:
			return fmt.Errorf("processRoutedHeaderMsgArgs Bad or Missing Reply Indicator: '%s'", args[2])
		}

		// Grab header size.
		c.pa.hdb = args[len(args)-2]
		c.pa.hdr = parseSize(c.pa.hdb)

		// Grab size.
		c.pa.szb = args[len(args)-1]
		c.pa.size = parseSize(c.pa.szb)

View on GitHub (pinned to 3a66a489d2)

Solutions

  1. Verify the sender emits a one-byte reply indicator token
  2. Match nats-server versions across the cluster
  3. Inspect the raw argument line for shifted optional fields
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/route.go:332 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nats-io/nats-server@3a66a489d2 (2026-09-02). Data as JSON: /api/errors/a53b054d0b3f93cb. Report an issue: GitHub.