Package com.rabbitmq.stream
Interface SubscriptionListener
-
public interface SubscriptionListener
Callback interface to customize a subscription.It is possible to change the computed
OffsetSpecification
inpreSubscribe(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 interface
SubscriptionListener.SubscriptionContext
Context object for the subscription.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
preSubscribe(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
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
-
-
-