Uses of Interface
org.apache.pulsar.client.api.Consumer
-
Uses of Consumer in org.apache.pulsar.client.api
Modifier and TypeMethodDescriptionConsumerBuilder.subscribe()
Finalize theConsumer
creation by subscribing to the topic.Modifier and TypeMethodDescriptionConsumerBuilder.subscribeAsync()
Finalize theConsumer
creation by subscribing to the topic in asynchronous mode.Modifier and TypeMethodDescriptionvoid
ConsumerEventListener.becameActive
(Consumer<?> consumer, int partitionId) Notified when the consumer group is changed, and the consumer becomes the active consumer.void
ConsumerEventListener.becameInactive
(Consumer<?> consumer, int partitionId) Notified when the consumer group is changed, and the consumer is still inactive or becomes inactive.ConsumerInterceptor.beforeConsume
(Consumer<T> consumer, Message<T> message) This is called just before the message is returned byreceive()
,MessageListener.received(Consumer, Message)
or theCompletableFuture
returned byreceiveAsync()
completes.void
ConsumerInterceptor.onAcknowledge
(Consumer<T> consumer, MessageId messageId, Throwable exception) This is called consumer sends the acknowledgment to the broker.void
ConsumerInterceptor.onAcknowledgeCumulative
(Consumer<T> consumer, MessageId messageId, Throwable exception) This is called consumer send the cumulative acknowledgment to the broker.void
ConsumerInterceptor.onAckTimeoutSend
(Consumer<T> consumer, Set<MessageId> messageIds) This method will be called when a redelivery from an acknowledge timeout occurs.void
ConsumerInterceptor.onNegativeAcksSend
(Consumer<T> consumer, Set<MessageId> messageIds) This method will be called when a redelivery from a negative acknowledge occurs.default void
MessageListener.reachedEndOfTopic
(Consumer<T> consumer) Get the notification when a topic is terminated.void
This method is called whenever a new message is received.