Skip to content
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

Messages for durables possibly sent before Subscription response #930

Closed
kozlovic opened this issue Sep 3, 2019 · 0 comments · Fixed by #931
Closed

Messages for durables possibly sent before Subscription response #930

kozlovic opened this issue Sep 3, 2019 · 0 comments · Fixed by #931
Assignees
Labels

Comments

@kozlovic
Copy link
Member

kozlovic commented Sep 3, 2019

If a durable subscription is closed (not unsubscribed) and later restarted while new messages are being published, it is possible that messages are sent prior to the subscription response protocol.
This is not visible in most of the client libraries since the subscription create usually holds a lock that is required during processing of the incoming messages.
However, this is not the case in Node.js.

@kozlovic kozlovic self-assigned this Sep 3, 2019
@kozlovic kozlovic added the bug label Sep 3, 2019
kozlovic added a commit that referenced this issue Sep 3, 2019
Original issue was addressed in PR #247, but unfortunately the fix
did not take into account durable subscriptions. If a durable
subscription is restarted, the subscription object is in memory
and would have the flag "initialized" already set to true, which
would not prevent published messages at the time of the subscription
request processing to allow messages to be sent prior to the
subscription response.

Resolves #930

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant