Uses of Interface
org.apache.pulsar.client.api.Message
Packages that use Message
Package
Description
Pulsar Client API.
Pulsar interceptors.
-
Uses of Message in org.apache.pulsar.client.api
Methods in org.apache.pulsar.client.api that return MessageModifier and TypeMethodDescription<T> Message<T>
MessagePayloadContext.asSingleMessage
(MessagePayload payload, Schema<T> schema) Convert the given payload to a single message if the entry is not a batch.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.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.<T> Message<T>
MessagePayloadContext.getMessageAt
(int index, int numMessages, MessagePayload payload, boolean containMetadata, Schema<T> schema) Get the internal single message with a specific index from a payload if the payload is a batch.Reader.readNext()
Read the next message in the topic.Read the next message in the topic waiting for a maximum time.Consumer.receive()
Receives a single message.Receive a single message.Methods in org.apache.pulsar.client.api that return types with arguments of type MessageModifier and TypeMethodDescriptionReader.readNextAsync()
Read asynchronously the next message in the topic.Consumer.receiveAsync()
Receive a single messageMethods in org.apache.pulsar.client.api with parameters of type MessageModifier and TypeMethodDescriptionvoid
Consumer.acknowledge
(Message<?> message) Acknowledge the consumption of a single message.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.Consumer.acknowledgeCumulativeAsync
(Message<?> message) Asynchronously Acknowledge the reception of all the messages in the stream up to (and including) the provided message.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.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, Throwable exception) Deprecated.This method is called when the message sent to the broker has been acknowledged, or when sending the message fails.void
This method is called whenever a new message is received.void
This method is called whenever a new message is received.void
Consumer.reconsumeLater
(Message<?> message, long delayTime, TimeUnit unit) reconsumeLater the consumption ofMessages
.void
Consumer.reconsumeLater
(Message<?> message, Map<String, String> customProperties, long delayTime, TimeUnit unit) reconsumeLater the consumption ofMessages
.Consumer.reconsumeLaterAsync
(Message<?> message, long delayTime, TimeUnit unit) Asynchronously reconsumeLater the consumption of a single message.Consumer.reconsumeLaterAsync
(Message<?> message, Map<String, String> customProperties, 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.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.Consumer.reconsumeLaterCumulativeAsync
(Message<?> message, Map<String, String> customProperties, long delayTime, TimeUnit unit) Asynchronously ReconsumeLater the reception of all the messages in the stream up to (and including) the provided message.Method parameters in org.apache.pulsar.client.api with type arguments of type MessageModifier and TypeMethodDescription<T> void
MessagePayloadProcessor.process
(MessagePayload payload, MessagePayloadContext context, Schema<T> schema, Consumer<Message<T>> messageConsumer) Process the message payload. -
Uses of Message in org.apache.pulsar.client.api.interceptor
Methods in org.apache.pulsar.client.api.interceptor that return MessageModifier and TypeMethodDescriptionProducerInterceptor.beforeSend
(Producer producer, Message message) This is called fromProducer.send(Object)
andProducer.sendAsync(Object)
methods, before send the message to the brokers.ProducerInterceptorWrapper.beforeSend
(Producer producer, Message message) Methods in org.apache.pulsar.client.api.interceptor with parameters of type MessageModifier and TypeMethodDescriptionProducerInterceptor.beforeSend
(Producer producer, Message message) This is called fromProducer.send(Object)
andProducer.sendAsync(Object)
methods, before send the message to the brokers.ProducerInterceptorWrapper.beforeSend
(Producer producer, Message message) boolean
Check whether the interceptor is eligible for this message.boolean
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)