public static enum MessageProducer.Execution extends Enum<MessageProducer.Execution>
Execution policies define how a producer interacts with the cluster and the type of feedback a producer expects from consumers. Producers send messages through the Atomix cluster, and send operations may be completed when committed to the cluster or when acknowledged by consumers depending on the configured execution policy.
SYNC producers send messages to consumers
and await acknowledgement from the consumer side of the queue. If a producer is producing to an entire group,
synchronous producers will await acknowledgement from all members of the group.ASYNC producers await acknowledgement of
persistence in the cluster but not acknowledgement that messages have been received and processed by consumers.REQUEST_REPLY producers await
arbitrary responses from all consumers to which a message is sent. If a message is sent to a group of consumers,
message reply futures will be completed with a list of reply values.| Enum Constant and Description |
|---|
ASYNC
Awaits acknowledgement of persistence in the cluster but not acknowledgement that messages have been received
and processed by consumers.
|
REQUEST_REPLY
Awaits arbitrary responses from all consumers to which a message is sent.
|
SYNC
Sends messages to consumers and awaits acknowledgement from the consumer side of the queue.
|
| Modifier and Type | Method and Description |
|---|---|
static MessageProducer.Execution |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MessageProducer.Execution[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MessageProducer.Execution SYNC
public static final MessageProducer.Execution ASYNC
public static final MessageProducer.Execution REQUEST_REPLY
public static MessageProducer.Execution[] values()
for (MessageProducer.Execution c : MessageProducer.Execution.values()) System.out.println(c);
public static MessageProducer.Execution valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2013–2017. All rights reserved.