Package com.rabbitmq.stream
Interface SubscriptionListener
public interface SubscriptionListener
Callback interface to customize a subscription.
It is possible to change the computed OffsetSpecification
in preSubscribe(SubscriptionContext)
by using a custom offset tracking strategy.
This is an experimental API, subject to change.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Context object for the subscription. -
Method Summary
Modifier and TypeMethodDescriptionvoid
preSubscribe
(SubscriptionListener.SubscriptionContext subscriptionContext) Callback called before the subscription is created.
-
Method Details
-
preSubscribe
Callback called before the subscription is created.The method is called when a
Consumer
is 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
OffsetSpecification
that will be used with theSubscriptionListener.SubscriptionContext.offsetSpecification(OffsetSpecification)
method.- Parameters:
subscriptionContext
-
-