Previously, we introduced the Subscriber#unsubscribe(String topic, String channel) call.
This method is unfortunately not correct if we create more than one subscription to the same topic, with the same channel, which is possible with the current client.
We would get in a situation where the unsubscribe call would unsubscribe from whatever subscription was created first.
This change:
Changes Subscriber#subscribe to return a unique SubscriptionId for each subscription. This method previously returned void, so should not be a breaking change.
Deprecates the old Subscriber#unsubscribe(String topic, String channel) call.
Replaces the call with a new Subscriber#unsubscribe(SubscriptionId).
Previously, we introduced the
Subscriber#unsubscribe(String topic, String channel)
call.This method is unfortunately not correct if we create more than one subscription to the same topic, with the same channel, which is possible with the current client.
We would get in a situation where the unsubscribe call would unsubscribe from whatever subscription was created first.
This change:
Subscriber#subscribe
to return a uniqueSubscriptionId
for each subscription. This method previously returned void, so should not be a breaking change.Subscriber#unsubscribe(String topic, String channel)
call.Subscriber#unsubscribe(SubscriptionId)
.Tests: Unit.