JetStream pull over export service response type stream#6172
Closed
roeschter wants to merge 6 commits intonats-io:mainfrom
Closed
JetStream pull over export service response type stream#6172roeschter wants to merge 6 commits intonats-io:mainfrom
roeschter wants to merge 6 commits intonats-io:mainfrom
Conversation
Member
|
Also this trick would not work for ack none IIRC since no reply would be given. |
Contributor
Author
|
Added two tests.
|
Contributor
Author
I just tested it an even with AckPolicy None, $JS.ACK is present |
Contributor
Author
|
Customer for the time being used the workaround/recommendation to always set a header in Jetstream messages. |
Member
|
Is this still relevant? |
Member
|
Closing for now, but we can reopen if we need to revisit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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