nats.ex
nats.ex copied to clipboard
Idle Heartbeat Header Parsing
When working with JetStream Push Consumers there's a type of header message that gets published that has headers like this: NATS/1.0 100 Idle Heartbeat\r\nNats-Last-Consumer: 2\r\nNats-Last-Stream: 2\r\n
. These messages result in a {:error, "Could not parse headers"}
. I believe because this line https://github.com/nats-io/nats.ex/blob/main/lib/gnat/parsec.ex#L116 is expecting a line break immediately after the NATS/1.0
declaration.
I merged #125 and released it as version 1.5.2 on hex.pm
Based on our conversation in that PR, we may still want to have a way of returning the status code from the header line. So I think we can leave this issue open and come back to it when we have a good idea of how to handle that scenario.
That sounds great. Thanks!
We haven't found the need to make more modifications here, so I'll go ahead and close this