Package org.apache.pulsar.client.api.v5
Interface MessageBuilder<T>
- Type Parameters:
T- the type of the message value
- All Superinterfaces:
MessageMetadata<T,MessageBuilder<T>>
Synchronous message builder, obtained from
Producer.newMessage().
Inherits all metadata setters from MessageMetadata and adds a
blocking send() terminal operation.
-
Method Summary
Methods inherited from interface org.apache.pulsar.client.api.v5.MessageMetadata
deliverAfter, deliverAt, eventTime, key, properties, property, replicationClusters, sequenceId, transaction, value
-
Method Details
-
send
Send the message synchronously and return its message ID.- Returns:
- the
MessageIdassigned to the published message by the broker - Throws:
PulsarClientException- if the message could not be sent (e.g., connection failure, send timeout, or topic authorization error)
-