@Immutable public class QueueOptions extends Object
Provides a value-semantic type, QueueOptions
, which is used to specify parameters for
a queue. The following parameters are supported:
maxUnconfirmedMessages
: Maximum number of outstanding messages that can be sent by
the broker without being confirmed.
maxUnconfirmedBytes
: Maximum accumulated bytes of all outstanding messages that can
be sent by the broker without being confirmed.
consumerPriority
: Priority of a consumer with respect to delivery of messages.
suspendsOnBadHostHealth
: Sets whether queue should suspend when the host machine is
unhealthy.
Modifier and Type | Class and Description |
---|---|
static class |
QueueOptions.Builder
A helper class to create immutable
QueueOptions with custom settings. |
Modifier and Type | Field and Description |
---|---|
static int |
k_CONSUMER_PRIORITY_DEFAULT
Default priority of a consumer with respect to delivery of messages.
|
static long |
k_MAX_UNCONFIRMED_BYTES_DEFAULT
Default maximum accumulated bytes of all outstanding messages that can be sent by the broker
without being confirmed.
|
static long |
k_MAX_UNCONFIRMED_MESSAGES_DEFAULT
Default maximum number of outstanding messages that can be sent by the broker without being
confirmed.
|
static boolean |
k_SUSPENDS_ON_BAD_HOST_HEALTH_DEFAULT
By default, queue is not sensitive to host-health changes.
|
Modifier and Type | Method and Description |
---|---|
static QueueOptions.Builder |
builder()
Returns a helper class object to create immutable
QueueOptions with custom settings. |
static QueueOptions |
createDefault()
Returns queue options with default values.
|
boolean |
equals(Object obj)
Returns true if this
QueueOptions is equal to the specified obj , false
otherwise. |
int |
getConsumerPriority()
Returns priority of a consumer with respect to delivery of messages.
|
long |
getMaxUnconfirmedBytes()
Returns maximum accumulated bytes of all outstanding messages that can be sent by the broker
without being confirmed.
|
long |
getMaxUnconfirmedMessages()
Returns maximum number of outstanding messages that can be sent by the broker without being
confirmed.
|
boolean |
getSuspendsOnBadHostHealth()
Gets whether queue suspends operation when the host machine is unhealthy.
|
boolean |
hasConsumerPriority()
Returns whether
consumerPriority has been set for this object, or whether it
implicitly holds k_CONSUMER_PRIORITY_DEFAULT . |
int |
hashCode()
Returns a hash code value for this
QueueOptions object. |
boolean |
hasMaxUnconfirmedBytes()
Returns whether
maxUnconfirmedBytes has been set for this object, or whether it
implicitly holds k_MAX_UNCONFIRMED_BYTES_DEFAULT . |
boolean |
hasMaxUnconfirmedMessages()
Returns whether
maxUnconfirmedMessages has been set for this object, or whether it
implicitly holds k_MAX_UNCONFIRMED_MESSAGES_DEFAULT . |
boolean |
hasSuspendsOnBadHostHealth()
Returns whether
suspendsOnBadHostHealth has been set for this object, or whether it
implicitly holds k_SUSPENDS_ON_BAD_HOST_HEALTH_DEFAULT . |
String |
toString() |
public static final long k_MAX_UNCONFIRMED_MESSAGES_DEFAULT
public static final long k_MAX_UNCONFIRMED_BYTES_DEFAULT
public static final int k_CONSUMER_PRIORITY_DEFAULT
public static final boolean k_SUSPENDS_ON_BAD_HOST_HEALTH_DEFAULT
public boolean equals(Object obj)
QueueOptions
is equal to the specified obj
, false
otherwise. Two QueueOptions
are equal if they have equal properties.public int hashCode()
QueueOptions
object.public long getMaxUnconfirmedMessages()
public boolean hasMaxUnconfirmedMessages()
maxUnconfirmedMessages
has been set for this object, or whether it
implicitly holds k_MAX_UNCONFIRMED_MESSAGES_DEFAULT
.maxUnconfirmedMessages
has been set.public long getMaxUnconfirmedBytes()
public boolean hasMaxUnconfirmedBytes()
maxUnconfirmedBytes
has been set for this object, or whether it
implicitly holds k_MAX_UNCONFIRMED_BYTES_DEFAULT
.maxUnconfirmedBytes
has been set.public int getConsumerPriority()
public boolean hasConsumerPriority()
consumerPriority
has been set for this object, or whether it
implicitly holds k_CONSUMER_PRIORITY_DEFAULT
.consumerPriority
has been set.public boolean getSuspendsOnBadHostHealth()
public boolean hasSuspendsOnBadHostHealth()
suspendsOnBadHostHealth
has been set for this object, or whether it
implicitly holds k_SUSPENDS_ON_BAD_HOST_HEALTH_DEFAULT
.suspendsOnBadHostHealth
has been set.public static QueueOptions.Builder builder()
QueueOptions
with custom settings.QueueOptions
public static QueueOptions createDefault()
Copyright © 2023 Bloomberg L.P.. All rights reserved.