-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JetStream pull over export service response type stream #6172
base: main
Are you sure you want to change the base?
JetStream pull over export service response type stream #6172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need tests.
Also this trick would not work for ack none IIRC since no reply would be given. |
Added two tests.
|
I just tested it an even with AckPolicy None, $JS.ACK is present |
Customer for the time being used the workaround/recommendation to always set a header in Jetstream messages. |
Suggested fix - no unit tests provided yet
When doing a Jetstream fetch request to a stream across an account boundary we export:
{ service: "$JS.API.>", accounts: [ "B" ], response_type: "stream" }
When the reply stream contain a nil message (no body no headers) the import reply subject mapping is removed. This seems to be by design. To Jetstream this looks like a message loss and results in timeouts and retries. Note that not just the nil message is suppressed but all messages coming after the nil messages are not delivered either.
Adding a header to all messages (e.g. Nats-Msg-Id) prevents this effect.
The fix here make removeRespServiceImport() Jetstream aware. Not removing it for messages which which $JS.ACK set. This is a minor fix with no performance impact as the check for JS reply subjects is done anyway further up in the code.
Also see internal Zendesk ticket [986]
Signed-off-by:m Michael Roeschter michael@synadia.com