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

test broker: Subscription Identifier handling #593

Open
jonesmz opened this issue Jan 20, 2020 · 2 comments
Open

test broker: Subscription Identifier handling #593

jonesmz opened this issue Jan 20, 2020 · 2 comments

Comments

@jonesmz
Copy link
Contributor

jonesmz commented Jan 20, 2020

https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901120

It is a Protocol Error for a PUBLISH packet to contain any Subscription Identifier other than those received in SUBSCRIBE packet which caused it to flow. A PUBLISH packet sent from a Client to a Server MUST NOT contain a Subscription Identifier [MQTT-3.3.4-6].

The test broker should disconnect client's that send a PUBLISH packet with a Subscription Identifier.

The client should assert that the Subscription Identifier received in a publish packet matches a subscription identifier that the client established with the server.

@kleunen
Copy link
Contributor

kleunen commented Dec 13, 2020

This issue still seems relevant for the broker as well, right ?

Maybe disconnect is a bit brutal, maybe generate a warning when client Publish contains Subscription Identifier and strip the Subscription Identifier ?

And maybe it is a bit too much overhead for the client to check every incoming publish ?

@redboltz
Copy link
Owner

I just create #762. Some of invalid combination of flags and properties can be checked without extra checking loop.
I didn't design it yes but I guess it works well.

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

No branches or pull requests

3 participants