nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
16k stars 1.41k forks source link

HMSG header format inconsistency when with HPUB vs with $JS.API.CONSUMER.MSG.NEXT #6134

Open tolgaulas opened 1 week ago

tolgaulas commented 1 week ago

Hello All, recent Nats-server

[1949268] 2024/11/15 00:24:54.770277 [INF]   Version:  2.10.22
[1949268] 2024/11/15 00:24:54.770280 [INF]   Git:      [240e9a4]
[1949268] 2024/11/15 00:24:54.770282 [INF]   Name:     nats_server_standalone
[1949268] 2024/11/15 00:24:54.770284 [INF]   Node:     YlG2Uy9H
[1949268] 2024/11/15 00:24:54.770285 [INF]   ID:       NBDRMOOE26PKACDIRHUTBMLJPQHLXLTRZT4SUA7KC23GZTCLCARXRQ2U

the $JS.API.CONSUMER.MSG.NEXT response HMSG does not comply with the NATS headers guideline (https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-4.md) which dictates the first line of headers to be exactly NATS/1.0␍␊, all the other HPUB generates conforming this however the consumer.msg.get emits and HMSGNATS/1.0 404 No Messages.. Also packet captured to be sure..

Very confusing.. Any roadmap on that?

Slack Message

derekcollison commented 1 week ago

We should update the ADR then, since you can have an optional status code and status description before the \r\n.

/cc @ripienaar