Package com.rabbitmq.stream
Interface SubscriptionListener
-
public interface SubscriptionListenerCallback interface to customize a subscription.It is possible to change the computed
OffsetSpecificationinpreSubscribe(SubscriptionContext)by using a custom offset tracking strategy.This is an experimental API, subject to change.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSubscriptionListener.SubscriptionContextContext object for the subscription.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidpreSubscribe(SubscriptionListener.SubscriptionContext subscriptionContext)Callback called before the subscription is created.
-
-
-
Method Detail
-
preSubscribe
void preSubscribe(SubscriptionListener.SubscriptionContext subscriptionContext)
Callback called before the subscription is created.The method is called when a
Consumeris created and it registers to the broker, and also when the subscription must be re-created (after a disconnection or when the subscription must move because the stream member it was connected to becomes unavailable).Application code can set the
OffsetSpecificationthat will be used with theSubscriptionListener.SubscriptionContext.offsetSpecification(OffsetSpecification)method.- Parameters:
subscriptionContext-
-
-