-
Notifications
You must be signed in to change notification settings - Fork 289
Description
The shorter HMSG example is seemingly incorrect.
The specified syntax is:
HMSG <subject> <sid> [reply-to] <#header bytes> <#total bytes>␍␊[headers]␍␊␍␊[payload]␍␊
When matching against the shorter example
HMSG FOO.BAR 34 45␍␊NATS/1.0␍␊FoodGroup: vegetable␍␊␍␊Hello World␍␊
,
note that only the HMSG
prefix and 3 values occur before the first ␍␊
marker, despite 4 values being the minimum required by the aforementioned syntax.
The following substitutions occur
<subject> := FOO.BAR
[reply-to] := <optional>
<#header bytes> := 34
<#total bytes> := 45
which leaves sid
without a value despite being required.
Changing this example to
HMSG FOO.BAR BAZ.69 34 45␍␊NATS/1.0␍␊FoodGroup: vegetable␍␊␍␊Hello World␍␊
by inserting BAZ.69
, would be an appropriate and simple fix.