CoAPConnect / coap-pubsub-rust

MIT License
5 stars 0 forks source link

Client can subscribe multiple times to same topic-data #50

Open SeKarri opened 3 months ago

SeKarri commented 3 months ago

Current broker implementation doesn't check if a client has already subscribed to topic-data, allowing multiple subscriptions to same topic-data from same client. This interaction isn't defined in the coap pubsub draft.

SeKarri commented 3 months ago

According to RFC7641 "A client MUST aggregate such requests and MUST NOT register more than once for the same target resource. The target resource is identified by all options in the request that are part of the Cache-Key. This includes, for example, the full request URI and the Accept Option." So it is clients duty not to register twice.

Kavan-M commented 2 months ago

I think this could still be done on a simple level from the broker side that there are no duplicate subscribers, but since it is the client's duty not to register twice to the same resource the client gets no notification about this