nats-io/nats-server · error

processRoutedOriginClusterMsgArgs Bad or Missing Reply Indic

Error message

processRoutedOriginClusterMsgArgs Bad or Missing Reply Indicator: '%s'

What it means

In the >6-token branch of processRoutedOriginClusterMsgArgs, args[3] is the reply indicator which must be exactly one byte ('+' for reply present, '|' for none). The check len(args[3]) != 1 failed, so the token expected to be the indicator is longer/empty — the argument list is misaligned, typically because an optional reply subject or queue list was omitted or added inconsistently.

Source

Thrown at server/route.go:235

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

		// 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 sending server builds RMSG args with a single-character reply indicator token
  2. Check cluster peer nats-server versions for protocol disagreement
  3. Inspect the raw arg line to see which optional field shifted the token positions
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/route.go:235 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/15ca0a021e4db841. Report an issue: GitHub.