Uses of Interface
org.apache.pulsar.client.api.Message
-
Packages that use Message Package Description org.apache.pulsar.client.api Pulsar Client API.org.apache.pulsar.client.api.interceptor Pulsar interceptors. -
-
Uses of Message in org.apache.pulsar.client.api
Methods in org.apache.pulsar.client.api that return Message Modifier and Type Method Description Message<T>
ConsumerInterceptor. beforeConsume(Consumer<T> consumer, Message<T> message)
This is called just before the message is returned byConsumer.receive()
,MessageListener.received(Consumer, Message)
or theCompletableFuture
returned byConsumer.receiveAsync()
completes.Message<T>
ProducerInterceptor. beforeSend(Producer<T> producer, Message<T> message)
Deprecated.This is called fromProducer.send(Object)
andProducer.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, java.util.concurrent.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, java.util.concurrent.TimeUnit unit)
Receive a single message.Methods in org.apache.pulsar.client.api that return types with arguments of type Message Modifier and Type Method Description java.util.concurrent.CompletableFuture<Message<T>>
Reader. readNextAsync()
Read asynchronously the next message in the topic.java.util.concurrent.CompletableFuture<Message<T>>
Consumer. receiveAsync()
Receive a single messageMethods in org.apache.pulsar.client.api with parameters of type Message Modifier and Type Method Description void
Consumer. acknowledge(Message<?> message)
Acknowledge the consumption of a single message.java.util.concurrent.CompletableFuture<java.lang.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.java.util.concurrent.CompletableFuture<java.lang.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 byConsumer.receive()
,MessageListener.received(Consumer, Message)
or theCompletableFuture
returned byConsumer.receiveAsync()
completes.Message<T>
ProducerInterceptor. beforeSend(Producer<T> producer, Message<T> message)
Deprecated.This is called fromProducer.send(Object)
andProducer.sendAsync(Object)
methods, before send the message to the brokers.default int
MessageRouter. choosePartition(Message<?> msg)
Deprecated.since 1.22.0.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, java.lang.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, java.util.concurrent.TimeUnit unit)
reconsumeLater the consumption ofMessages
.java.util.concurrent.CompletableFuture<java.lang.Void>
Consumer. reconsumeLaterAsync(Message<?> message, long delayTime, java.util.concurrent.TimeUnit unit)
Asynchronously reconsumeLater the consumption of a single message.void
Consumer. reconsumeLaterCumulative(Message<?> message, long delayTime, java.util.concurrent.TimeUnit unit)
reconsumeLater the reception of all the messages in the stream up to (and including) the provided message.java.util.concurrent.CompletableFuture<java.lang.Void>
Consumer. reconsumeLaterCumulativeAsync(Message<?> message, long delayTime, java.util.concurrent.TimeUnit unit)
Asynchronously ReconsumeLater the reception of all the messages in the stream up to (and including) the provided message. -
Uses of Message in org.apache.pulsar.client.api.interceptor
Methods in org.apache.pulsar.client.api.interceptor that return Message Modifier and Type Method Description Message
ProducerInterceptor. beforeSend(Producer producer, Message message)
This is called fromProducer.send(Object)
andProducer.sendAsync(Object)
methods, before send the message to the brokers.Message
ProducerInterceptorWrapper. beforeSend(Producer producer, Message message)
Methods in org.apache.pulsar.client.api.interceptor with parameters of type Message Modifier and Type Method Description Message
ProducerInterceptor. beforeSend(Producer producer, Message message)
This is called fromProducer.send(Object)
andProducer.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, java.lang.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, java.lang.Throwable exception)
-