Class QueueConfiguration
- java.lang.Object
-
- org.apache.activemq.artemis.api.core.QueueConfiguration
-
- All Implemented Interfaces:
Serializable
public class QueueConfiguration extends Object implements Serializable
This class holds all the properties required to configure a queue. The only strictly required property isname. Some defaults will be enforced for properties which are not explicitly set:address: the value set fornametransient:falsetemporary:falsedurable:trueautoCreated:falseinternal:falseconfigurationManaged:false
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringADDRESSstatic StringAUTO_CREATE_ADDRESSstatic StringAUTO_CREATEDstatic StringAUTO_DELETEstatic StringAUTO_DELETE_DELAYstatic StringAUTO_DELETE_MESSAGE_COUNTstatic StringCONFIGURATION_MANAGEDstatic StringCONSUMER_PRIORITYstatic StringCONSUMERS_BEFORE_DISPATCHstatic StringDELAY_BEFORE_DISPATCHstatic StringDURABLEstatic StringENABLEDstatic StringEXCLUSIVEstatic StringFILTER_STRINGstatic StringFQQNstatic StringGROUP_BUCKETSstatic StringGROUP_FIRST_KEYstatic StringGROUP_REBALANCEstatic StringGROUP_REBALANCE_PAUSE_DISPATCHstatic StringIDstatic StringINTERNALstatic StringLAST_VALUEstatic StringLAST_VALUE_KEYstatic StringMAX_CONSUMERSstatic StringNAMEstatic StringNON_DESTRUCTIVEstatic StringPURGE_ON_NO_CONSUMERSstatic StringRING_SIZEstatic StringROUTING_TYPEstatic StringTEMPORARYstatic StringTRANSIENTstatic StringUSER
-
Constructor Summary
Constructors Constructor Description QueueConfiguration()QueueConfiguration(String name)Instantiate this object and invokesetName(SimpleString)QueueConfiguration(QueueConfiguration o)QueueConfiguration(SimpleString name)Instantiate this object and invokesetName(SimpleString)
-
Method Summary
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
ADDRESS
public static final String ADDRESS
- See Also:
- Constant Field Values
-
ROUTING_TYPE
public static final String ROUTING_TYPE
- See Also:
- Constant Field Values
-
FILTER_STRING
public static final String FILTER_STRING
- See Also:
- Constant Field Values
-
DURABLE
public static final String DURABLE
- See Also:
- Constant Field Values
-
USER
public static final String USER
- See Also:
- Constant Field Values
-
MAX_CONSUMERS
public static final String MAX_CONSUMERS
- See Also:
- Constant Field Values
-
EXCLUSIVE
public static final String EXCLUSIVE
- See Also:
- Constant Field Values
-
GROUP_REBALANCE
public static final String GROUP_REBALANCE
- See Also:
- Constant Field Values
-
GROUP_REBALANCE_PAUSE_DISPATCH
public static final String GROUP_REBALANCE_PAUSE_DISPATCH
- See Also:
- Constant Field Values
-
GROUP_BUCKETS
public static final String GROUP_BUCKETS
- See Also:
- Constant Field Values
-
GROUP_FIRST_KEY
public static final String GROUP_FIRST_KEY
- See Also:
- Constant Field Values
-
LAST_VALUE
public static final String LAST_VALUE
- See Also:
- Constant Field Values
-
LAST_VALUE_KEY
public static final String LAST_VALUE_KEY
- See Also:
- Constant Field Values
-
NON_DESTRUCTIVE
public static final String NON_DESTRUCTIVE
- See Also:
- Constant Field Values
-
PURGE_ON_NO_CONSUMERS
public static final String PURGE_ON_NO_CONSUMERS
- See Also:
- Constant Field Values
-
ENABLED
public static final String ENABLED
- See Also:
- Constant Field Values
-
CONSUMERS_BEFORE_DISPATCH
public static final String CONSUMERS_BEFORE_DISPATCH
- See Also:
- Constant Field Values
-
DELAY_BEFORE_DISPATCH
public static final String DELAY_BEFORE_DISPATCH
- See Also:
- Constant Field Values
-
CONSUMER_PRIORITY
public static final String CONSUMER_PRIORITY
- See Also:
- Constant Field Values
-
AUTO_DELETE
public static final String AUTO_DELETE
- See Also:
- Constant Field Values
-
AUTO_DELETE_DELAY
public static final String AUTO_DELETE_DELAY
- See Also:
- Constant Field Values
-
AUTO_DELETE_MESSAGE_COUNT
public static final String AUTO_DELETE_MESSAGE_COUNT
- See Also:
- Constant Field Values
-
RING_SIZE
public static final String RING_SIZE
- See Also:
- Constant Field Values
-
CONFIGURATION_MANAGED
public static final String CONFIGURATION_MANAGED
- See Also:
- Constant Field Values
-
TEMPORARY
public static final String TEMPORARY
- See Also:
- Constant Field Values
-
AUTO_CREATE_ADDRESS
public static final String AUTO_CREATE_ADDRESS
- See Also:
- Constant Field Values
-
INTERNAL
public static final String INTERNAL
- See Also:
- Constant Field Values
-
TRANSIENT
public static final String TRANSIENT
- See Also:
- Constant Field Values
-
AUTO_CREATED
public static final String AUTO_CREATED
- See Also:
- Constant Field Values
-
FQQN
public static final String FQQN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QueueConfiguration
public QueueConfiguration()
-
QueueConfiguration
public QueueConfiguration(QueueConfiguration o)
-
QueueConfiguration
public QueueConfiguration(SimpleString name)
Instantiate this object and invokesetName(SimpleString)- Parameters:
name- the name to use for the queue- See Also:
setName(SimpleString)
-
QueueConfiguration
public QueueConfiguration(String name)
Instantiate this object and invokesetName(SimpleString)- Parameters:
name- the name to use for the queue- See Also:
setName(SimpleString)
-
-
Method Detail
-
set
public QueueConfiguration set(String key, String value)
Set the value of a parameter based on its "key"String. Valid key names and correspondingstaticfinalare:- id:
ID - name:
NAME - address:
ADDRESS - routing-type:
ROUTING_TYPE - filter-string:
FILTER_STRING - durable:
DURABLE - user:
USER - max-consumers:
MAX_CONSUMERS - exclusive:
EXCLUSIVE - group-rebalance:
GROUP_REBALANCE - group-rebalance-pause-dispatch:
GROUP_REBALANCE_PAUSE_DISPATCH - group-buckets:
GROUP_BUCKETS - group-first-key:
GROUP_FIRST_KEY - last-value:
LAST_VALUE - last-value-key:
LAST_VALUE_KEY - non-destructive:
NON_DESTRUCTIVE - purge-on-no-consumers:
PURGE_ON_NO_CONSUMERS - consumers-before-dispatch:
CONSUMERS_BEFORE_DISPATCH - delay-before-dispatch:
DELAY_BEFORE_DISPATCH - consumer-priority:
CONSUMER_PRIORITY - auto-delete:
AUTO_DELETE - auto-delete-delay:
AUTO_DELETE_DELAY - auto-delete-message-count:
AUTO_DELETE_MESSAGE_COUNT - ring-size:
RING_SIZE - configuration-managed:
ID - temporary:
TEMPORARY - auto-create-address:
AUTO_CREATE_ADDRESS - internal:
INTERNAL - transient:
TRANSIENT - auto-created:
AUTO_CREATED
The
String-based values will be converted to the proper value types based on the underlying property. For example, if you pass the value "TRUE" for the key "auto-created" theString"TRUE" will be converted to theBooleantrue.- Parameters:
key- the key to set to the valuevalue- the value to set for the key- Returns:
- this
QueueConfiguration
- id:
-
getId
public Long getId()
-
setId
public QueueConfiguration setId(Long id)
-
getAddress
public SimpleString getAddress()
- Returns:
- the name of the address; if the address is
nullthen return the value ofgetName().
-
setAddress
public QueueConfiguration setAddress(SimpleString address)
Set the address. If the fully-qualified queue name is used then it will be parsed and the corresponding values foraddressandnamewill be set automatically. For example if "myAddress::myQueue" is passed then the resulting value foraddresswill be "myAddress" and the value fornamewill be "myQueue".- Parameters:
address- the address to use- Returns:
- this
QueueConfiguration
-
setAddress
public QueueConfiguration setAddress(String address)
- See Also:
setAddress(SimpleString)
-
getName
public SimpleString getName()
-
setName
public QueueConfiguration setName(SimpleString name)
Set the name. If the fully-qualified queue name is used then it will be parsed and the corresponding values foraddressandnamewill be set automatically. For example if "myAddress::myQueue" is passed then the resulting value foraddresswill be "myAddress" and the value fornamewill be "myQueue".- Parameters:
name- the name to use- Returns:
- this
QueueConfiguration
-
setName
public QueueConfiguration setName(String name)
- See Also:
setName(SimpleString)
-
getRoutingType
public RoutingType getRoutingType()
-
setRoutingType
public QueueConfiguration setRoutingType(RoutingType routingType)
-
getFilterString
public SimpleString getFilterString()
-
setFilterString
public QueueConfiguration setFilterString(SimpleString filterString)
-
setFilterString
public QueueConfiguration setFilterString(String filterString)
-
isDurable
public Boolean isDurable()
defaults totrue- Returns:
-
setDurable
public QueueConfiguration setDurable(Boolean durable)
-
getUser
public SimpleString getUser()
-
setUser
public QueueConfiguration setUser(SimpleString user)
-
setUser
public QueueConfiguration setUser(String user)
-
getMaxConsumers
public Integer getMaxConsumers()
-
setMaxConsumers
public QueueConfiguration setMaxConsumers(Integer maxConsumers)
-
isExclusive
public Boolean isExclusive()
-
setExclusive
public QueueConfiguration setExclusive(Boolean exclusive)
-
isLastValue
public Boolean isLastValue()
-
setLastValue
public QueueConfiguration setLastValue(Boolean lastValue)
-
getLastValueKey
public SimpleString getLastValueKey()
-
setLastValueKey
public QueueConfiguration setLastValueKey(SimpleString lastValueKey)
-
setLastValueKey
public QueueConfiguration setLastValueKey(String lastValueKey)
-
isNonDestructive
public Boolean isNonDestructive()
-
setNonDestructive
public QueueConfiguration setNonDestructive(Boolean nonDestructive)
-
isPurgeOnNoConsumers
public Boolean isPurgeOnNoConsumers()
-
setPurgeOnNoConsumers
public QueueConfiguration setPurgeOnNoConsumers(Boolean purgeOnNoConsumers)
-
isEnabled
public Boolean isEnabled()
-
setEnabled
public QueueConfiguration setEnabled(Boolean enabled)
-
getConsumersBeforeDispatch
public Integer getConsumersBeforeDispatch()
-
setConsumersBeforeDispatch
public QueueConfiguration setConsumersBeforeDispatch(Integer consumersBeforeDispatch)
-
getDelayBeforeDispatch
public Long getDelayBeforeDispatch()
-
setDelayBeforeDispatch
public QueueConfiguration setDelayBeforeDispatch(Long delayBeforeDispatch)
-
getConsumerPriority
public Integer getConsumerPriority()
-
setConsumerPriority
public QueueConfiguration setConsumerPriority(Integer consumerPriority)
-
isGroupRebalance
public Boolean isGroupRebalance()
-
setGroupRebalance
public QueueConfiguration setGroupRebalance(Boolean groupRebalance)
-
isGroupRebalancePauseDispatch
public Boolean isGroupRebalancePauseDispatch()
-
setGroupRebalancePauseDispatch
public QueueConfiguration setGroupRebalancePauseDispatch(Boolean groupRebalancePauseDispatch)
-
getGroupBuckets
public Integer getGroupBuckets()
-
setGroupBuckets
public QueueConfiguration setGroupBuckets(Integer groupBuckets)
-
getGroupFirstKey
public SimpleString getGroupFirstKey()
-
setGroupFirstKey
public QueueConfiguration setGroupFirstKey(SimpleString groupFirstKey)
-
setGroupFirstKey
public QueueConfiguration setGroupFirstKey(String groupFirstKey)
-
isAutoDelete
public Boolean isAutoDelete()
-
setAutoDelete
public QueueConfiguration setAutoDelete(Boolean autoDelete)
-
getAutoDeleteDelay
public Long getAutoDeleteDelay()
-
setAutoDeleteDelay
public QueueConfiguration setAutoDeleteDelay(Long autoDeleteDelay)
-
getAutoDeleteMessageCount
public Long getAutoDeleteMessageCount()
-
setAutoDeleteMessageCount
public QueueConfiguration setAutoDeleteMessageCount(Long autoDeleteMessageCount)
-
getRingSize
public Long getRingSize()
-
setRingSize
public QueueConfiguration setRingSize(Long ringSize)
-
isConfigurationManaged
public Boolean isConfigurationManaged()
defaults tofalse- Returns:
-
setConfigurationManaged
public QueueConfiguration setConfigurationManaged(Boolean configurationManaged)
-
isTemporary
public Boolean isTemporary()
defaults tofalse- Returns:
-
setTemporary
public QueueConfiguration setTemporary(Boolean temporary)
-
isAutoCreateAddress
public Boolean isAutoCreateAddress()
-
setAutoCreateAddress
public QueueConfiguration setAutoCreateAddress(Boolean autoCreateAddress)
-
isInternal
public Boolean isInternal()
defaults tofalse- Returns:
-
setInternal
public QueueConfiguration setInternal(Boolean internal)
-
isTransient
public Boolean isTransient()
defaults tofalse- Returns:
-
setTransient
public QueueConfiguration setTransient(Boolean _transient)
-
isAutoCreated
public Boolean isAutoCreated()
defaults tofalse- Returns:
-
setAutoCreated
public QueueConfiguration setAutoCreated(Boolean autoCreated)
-
isFqqn
public Boolean isFqqn()
Based on if the name or address uses FQQN when set defaults tofalse- Returns:
-
toJSON
public String toJSON()
This method returns a JSON-formattedStringrepresentation of thisQueueConfiguration. It is a simple collection of key/value pairs. The keys used are referenced inset(String, String).- Returns:
- a JSON-formatted
Stringrepresentation of thisQueueConfiguration
-
fromJSON
public static QueueConfiguration fromJSON(String jsonString)
This method returns aQueueConfigurationcreated from the JSON-formatted inputString. The input should be a simple object of key/value pairs. Valid keys are referenced inset(String, String).- Parameters:
jsonString-- Returns:
- the
QueueConfigurationcreated from the JSON-formatted inputString
-
-