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

feat(quic): support logical stream id #252

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

qzhuyan
Copy link
Contributor

@qzhuyan qzhuyan commented Sep 12, 2024

We need logic stream. The QUIC stream id is not transparent to the user that user is not free to choice the stream id while create the stream, thus we need logical stream to present the 'session stream' persistency.
If the QUIC stream is closed or aborted, the logical stream could be kept alive by starting new stream where both endpoints exchange the logic stream id in the stream header. This is not done yet but written in mqtt-next spec.

@qzhuyan qzhuyan marked this pull request as draft September 12, 2024 08:38
@zmstone
Copy link
Member

zmstone commented Sep 13, 2024

make sense to add a topic -> stream ID mapping callback ?
or by default creates two streams, 0, and 1, then the callback can return 0 or 1.

@qzhuyan
Copy link
Contributor Author

qzhuyan commented Sep 13, 2024

We could have the callback, but mapping topic to stream isn't the only usecase.

In short, we need logic stream anyway. The QUIC stream id is not transparent to the user that user is not free to choice the stream id while create the stream, thus we need logical stream to present the 'session stream' persistency.

If the QUIC stream is closed or aborted, the logical stream could be kept alive by starting new stream where both endpoints exchange the logic stream id in the stream header. This is not done yet but written in mqtt-next spec.

@qzhuyan qzhuyan marked this pull request as ready for review September 13, 2024 11:36
Copy link
Contributor

@thalesmg thalesmg left a comment

Choose a reason for hiding this comment

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

Is it possible to add some tests to display how to use?

@qzhuyan
Copy link
Contributor Author

qzhuyan commented Sep 14, 2024

Is it possible to add some tests to display how to use?

yes! urgently need this get merged for this emqx/emqtt-bench#202

@qzhuyan qzhuyan merged commit 72ff933 into master Sep 14, 2024
26 checks passed
@qzhuyan qzhuyan deleted the dev/william/quic-support-logic-stream-id branch September 14, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants