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

MQTT streaming: Tolerate DUP PUBLISH messages on first connecting #1436

Merged
merged 1 commit into from
Jan 18, 2019

Conversation

huntc
Copy link
Contributor

@huntc huntc commented Jan 18, 2019

It is quite possible that a client can receive a PUBLISH message immediately on connection and before a subscription occurs given the prior establishment of a server-side session. In this case, the PUBLISH message will often have the DUP flag set. Prior to this PR, the DUP flag would cause a packet router failure given that the routing decision was being performed out of step with where the routing state is managed. This PR moves that routing logic to the correct place.

A new test has also been added for the use-case described above along with existing coverage validating the DUP processing.

It is quite possible that a client can receive a PUBLISH message immediately on connection and prior to a subscription given the prior establishment of a server-side session. In this case, the PUBLISH message will often have the DUP flag set. Prior to this commit, the DUP flag would cause a packet router failure given that the routing decision was being performed out of step with where the routing state is managed. This commit moves that routing logic to the correct place.

A new test has been added for the use-case described above and existing coverage also validates the DUP processing.
@ennru ennru changed the title Tolerate DUP PUBLISH messages on first connecting MQTT streaming: Tolerate DUP PUBLISH messages on first connecting Jan 18, 2019
Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ennru ennru added this to the 1.0-M3 milestone Jan 18, 2019
@ennru ennru merged commit 46238b2 into akka:master Jan 18, 2019
@huntc huntc deleted the dup-on-first branch January 18, 2019 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants