Package | Description |
---|---|
org.apache.pulsar.client.api |
Pulsar Client API.
|
org.apache.pulsar.client.api.interceptor |
Pulsar interceptors.
|
Modifier and Type | Method and Description |
---|---|
Message<T> |
ConsumerInterceptor.beforeConsume(Consumer<T> consumer,
Message<T> message)
This is called just before the message is returned by
Consumer.receive() , MessageListener.received(Consumer,
Message) or the CompletableFuture returned by
Consumer.receiveAsync() completes. |
Message<T> |
ProducerInterceptor.beforeSend(Producer<T> producer,
Message<T> message)
Deprecated.
This is called from
Producer.send(Object) and Producer.sendAsync(Object) methods, before
send the message to the brokers. |
Message<T> |
Reader.readNext()
Read the next message in the topic.
|
Message<T> |
Reader.readNext(int timeout,
TimeUnit unit)
Read the next message in the topic waiting for a maximum time.
|
Message<T> |
Consumer.receive()
Receives a single message.
|
Message<T> |
Consumer.receive(int timeout,
TimeUnit unit)
Receive a single message.
|
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Message<T>> |
Reader.readNextAsync()
Read asynchronously the next message in the topic.
|
CompletableFuture<Message<T>> |
Consumer.receiveAsync()
Receive a single message
|
Modifier and Type | Method and Description |
---|---|
void |
Consumer.acknowledge(Message<?> message)
Acknowledge the consumption of a single message.
|
CompletableFuture<Void> |
Consumer.acknowledgeAsync(Message<?> message)
Asynchronously acknowledge the consumption of a single message.
|
void |
Consumer.acknowledgeCumulative(Message<?> message)
Acknowledge the reception of all the messages in the stream up to (and including) the provided message.
|
CompletableFuture<Void> |
Consumer.acknowledgeCumulativeAsync(Message<?> message)
Asynchronously Acknowledge the reception of all the messages in the stream up to (and including) the provided
message.
|
Message<T> |
ConsumerInterceptor.beforeConsume(Consumer<T> consumer,
Message<T> message)
This is called just before the message is returned by
Consumer.receive() , MessageListener.received(Consumer,
Message) or the CompletableFuture returned by
Consumer.receiveAsync() completes. |
Message<T> |
ProducerInterceptor.beforeSend(Producer<T> producer,
Message<T> message)
Deprecated.
This is called from
Producer.send(Object) and Producer.sendAsync(Object) methods, before
send the message to the brokers. |
default int |
MessageRouter.choosePartition(Message<?> msg)
Deprecated.
since 1.22.0. Please use
MessageRouter.choosePartition(Message, TopicMetadata) instead. |
default int |
MessageRouter.choosePartition(Message<?> msg,
TopicMetadata metadata)
Choose a partition based on msg and the topic metadata.
|
void |
Consumer.negativeAcknowledge(Message<?> message)
Acknowledge the failure to process a single message.
|
void |
ProducerInterceptor.onSendAcknowledgement(Producer<T> producer,
Message<T> message,
MessageId msgId,
Throwable exception)
Deprecated.
This method is called when the message sent to the broker has been
acknowledged, or when sending the message fails.
|
void |
MessageListener.received(Consumer<T> consumer,
Message<T> msg)
This method is called whenever a new message is received.
|
void |
ReaderListener.received(Reader<T> reader,
Message<T> msg)
This method is called whenever a new message is received.
|
void |
Consumer.reconsumeLater(Message<?> message,
long delayTime,
TimeUnit unit)
reconsumeLater the consumption of
Messages . |
CompletableFuture<Void> |
Consumer.reconsumeLaterAsync(Message<?> message,
long delayTime,
TimeUnit unit)
Asynchronously reconsumeLater the consumption of a single message.
|
void |
Consumer.reconsumeLaterCumulative(Message<?> message,
long delayTime,
TimeUnit unit)
reconsumeLater the reception of all the messages in the stream up to (and including) the provided message.
|
CompletableFuture<Void> |
Consumer.reconsumeLaterCumulativeAsync(Message<?> message,
long delayTime,
TimeUnit unit)
Asynchronously ReconsumeLater the reception of all the messages in the stream up to (and including) the provided
message.
|
Modifier and Type | Method and Description |
---|---|
Message |
ProducerInterceptor.beforeSend(Producer producer,
Message message)
This is called from
Producer.send(Object) and Producer.sendAsync(Object) methods, before
send the message to the brokers. |
Message |
ProducerInterceptorWrapper.beforeSend(Producer producer,
Message message) |
Modifier and Type | Method and Description |
---|---|
Message |
ProducerInterceptor.beforeSend(Producer producer,
Message message)
This is called from
Producer.send(Object) and Producer.sendAsync(Object) methods, before
send the message to the brokers. |
Message |
ProducerInterceptorWrapper.beforeSend(Producer producer,
Message message) |
boolean |
ProducerInterceptor.eligible(Message message)
Check whether the interceptor is eligible for this message.
|
boolean |
ProducerInterceptorWrapper.eligible(Message message) |
void |
ProducerInterceptor.onSendAcknowledgement(Producer producer,
Message message,
MessageId msgId,
Throwable exception)
This method is called when the message sent to the broker has been
acknowledged, or when sending the message fails.
|
void |
ProducerInterceptorWrapper.onSendAcknowledgement(Producer producer,
Message message,
MessageId msgId,
Throwable exception) |
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.