| Package | Description |
|---|---|
| org.apache.pulsar.client.api |
Pulsar Client API.
|
| Modifier and Type | Method and Description |
|---|---|
Consumer<T> |
ConsumerBuilder.subscribe()
Finalize the
Consumer creation by subscribing to the topic. |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Consumer<T>> |
ConsumerBuilder.subscribeAsync()
Finalize the
Consumer creation by subscribing to the topic in asynchronous mode. |
| Modifier and Type | Method and Description |
|---|---|
void |
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.
|
Message<T> |
ConsumerInterceptor.beforeConsume(Consumer<T> consumer,
Message<T> message)
This is called just before the message is returned by
receive(), MessageListener.received(Consumer,
Message) or the CompletableFuture returned by
receiveAsync() 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 |
MessageListener.received(Consumer<T> consumer,
Message<T> msg)
This method is called whenever a new message is received.
|
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.