Class SubscriptionQueryMembersChangedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.common.AxonException
io.axoniq.framework.springcloud.query.SubscriptionQueryMembersChangedException
All Implemented Interfaces:
Serializable

public class SubscriptionQueryMembersChangedException extends AxonException
Raised when the members able to answer a subscription query changed while it was active.

A subscription query is answered by every member advertising its name, because an update is emitted on whichever member's state changed and only reaches subscriptions that member holds a registration for. When a member starts advertising the name after a subscription began, that subscription cannot be repaired by subscribing to the new member: the updates it emitted between advertising the name and being subscribed to are already gone, and no amount of catching up recovers them. Likewise, when every member answering a subscription has left, nothing is left to emit its updates, and a member that starts handling the query afterwards is not subscribed to.

Failing is therefore the honest outcome. A subscriber that acts on this by establishing the subscription query again gets a fresh initial result and a complete stream of updates from that point, where one that carried on would silently be missing whatever it missed.

Since:
5.4.0
Author:
Allard Buijze
See Also:
  • Constructor Details

    • SubscriptionQueryMembersChangedException

      public SubscriptionQueryMembersChangedException(String message)
      Constructs a SubscriptionQueryMembersChangedException with the given message.
      Parameters:
      message - the description of how the members able to answer the query changed