public interface Producer extends AutoCloseable
Instances are created and configured with a ProducerBuilder.
ProducerBuilder,
Environment.producerBuilder()| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the producer.
|
long |
getLastPublishingId()
Get the last publishing ID for a named producer.
|
MessageBuilder |
messageBuilder()
Return a
MessageBuilder to create a Message. |
void |
send(Message message,
ConfirmationHandler confirmationHandler)
Publish a message.
|
MessageBuilder messageBuilder()
MessageBuilder to create a Message.
A MessageBuilder instance is meant to create only Message instance.
MessageBuilderMessageBuilderlong getLastPublishingId()
The value can be mapped to a business index to restart publishing where a previous incarnation of the producer left off.
void send(Message message, ConfirmationHandler confirmationHandler)
message - the messageconfirmationHandler - the callback when the message is confirmed or failedvoid close()
close in interface AutoCloseableCopyright © 2021 VMware, Inc. or its affiliates.. All rights reserved.