public class MessageConsumerOptions extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_LOCAL_ONLY |
static int |
DEFAULT_MAX_BUFFERED_MESSAGES |
Constructor and Description |
---|
MessageConsumerOptions() |
MessageConsumerOptions(JsonObject json) |
MessageConsumerOptions(MessageConsumerOptions options) |
Modifier and Type | Method and Description |
---|---|
String |
getAddress() |
int |
getMaxBufferedMessages() |
boolean |
isLocalOnly() |
MessageConsumerOptions |
setAddress(String address)
Set the address the event-bus will register the consumer at.
|
MessageConsumerOptions |
setLocalOnly(boolean localOnly)
Set whether the consumer is local only.
|
MessageConsumerOptions |
setMaxBufferedMessages(int maxBufferedMessages)
Set the number of messages this registration will buffer when this stream is paused.
|
JsonObject |
toJson() |
public static final int DEFAULT_MAX_BUFFERED_MESSAGES
public static final boolean DEFAULT_LOCAL_ONLY
public MessageConsumerOptions()
public MessageConsumerOptions(MessageConsumerOptions options)
public MessageConsumerOptions(JsonObject json)
public String getAddress()
public MessageConsumerOptions setAddress(String address)
address
- the consumer addresspublic boolean isLocalOnly()
public MessageConsumerOptions setLocalOnly(boolean localOnly)
localOnly
- whether the consumer is local onlypublic int getMaxBufferedMessages()
public MessageConsumerOptions setMaxBufferedMessages(int maxBufferedMessages)
1000
.
When a new value is set, buffered messages may be discarded to reach the new value. The most recent messages will be kept.
maxBufferedMessages
- the maximum number of messages that can be bufferedpublic JsonObject toJson()
Copyright © 2025 Eclipse. All rights reserved.