only last client gets updates on same uaid channel pair
Closed this issue · 2 comments
JR mentioned the last one that registers the channel gets an notification but this scenario seems odd:
steps:
- subscriberA registers channel - foo:bar
- subscriberB registers channel - foo:bar
- issue a HTTP PUT to the channel foo:bar
result: only subscriberB gets notification message. I would expect that all subscribers would get notification for the same uaid:channel pair.
That's because you've got two devices with the same User Agent ID (so basically, one of them is lying).
If I understand what you're trying to do, you've got a UAID of "foo" and trying to create a channel of "bar".
Normally, the client creates both the UAID and channel IDs as unique UUID values, so normally SubscriberA would have something like "317206c7-5e7a-48f2-ad3f-a2aac7cb773d:d5e65687-f58f-4b9d-82bd-a63298b94052 and SubscriberB would have "f71b9f20-1ec0-442f-97a6-4d6201c81a73:71db7869-2291-489c-bf33-62fbbf3e3b88"
If there are two devices with the same UAID, however, then the last device to connect to the server "wins". (so if two devices identify with something like { "messageType":"hello", "channelIDs":[], "uaid":"f71b9f20-1ec0-442f-97a6-4d6201c81a73"} then the last one to do so will get the notifications.)
Does that answer your question or did I misunderstand what the bug is?
i guess my mental model was that multple clients would subscribe to one UAID:Channel pair. A one-to-many type broadcast. But it sounds like the design is that the vendor needs to track all devices registered, then HTTP PUT for each client. I'll close this.