Class QueueConfiguration
java.lang.Object
org.apache.activemq.artemis.api.core.QueueConfiguration
- All Implemented Interfaces:
Serializable
This class holds all the properties required to configure a queue. The only strictly required property is
name. 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.QueueConfiguration(String name) Deprecated, for removal: This API element is subject to removal in a future version.Useof(String)instead.Deprecated, for removal: This API element is subject to removal in a future version.Useof(QueueConfiguration)instead.Deprecated, for removal: This API element is subject to removal in a future version.Useof(SimpleString)instead. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic QueueConfigurationThis method returns aQueueConfigurationcreated from the JSON-formatted inputString.Returns the name of the address; if the address isnullthen return the value ofgetName().getId()getName()getUser()inthashCode()defaults tofalsedefaults tofalsedefaults totrueisFqqn()Based on if the name or address uses FQQN when set defaults tofalsedefaults tofalsedefaults tofalsedefaults tofalsestatic QueueConfigurationInstance factory which invokessetName(SimpleString)static QueueConfigurationof(QueueConfiguration queueConfiguration) Returns theQueueConfigurationinstance which is a copy of the input parameter.static QueueConfigurationof(SimpleString name) Instance factory which invokessetName(SimpleString)Set the value of a parameter based on its "key"String.setAddress(String address) Converts the inputStringand invokessetAddress(SimpleString)setAddress(SimpleString address) Set the address.setAutoCreateAddress(Boolean autoCreateAddress) setAutoCreated(Boolean autoCreated) setAutoDelete(Boolean autoDelete) setAutoDeleteDelay(Long autoDeleteDelay) setAutoDeleteMessageCount(Long autoDeleteMessageCount) setConfigurationManaged(Boolean configurationManaged) setConsumerPriority(Integer consumerPriority) setConsumersBeforeDispatch(Integer consumersBeforeDispatch) setDelayBeforeDispatch(Long delayBeforeDispatch) setDurable(Boolean durable) setEnabled(Boolean enabled) setExclusive(Boolean exclusive) setFilterString(String filterString) setFilterString(SimpleString filterString) This sets theSimpleStringvalue that will be used to create aFilterfor theQueueimplementation on the broker.setGroupBuckets(Integer groupBuckets) setGroupFirstKey(String groupFirstKey) setGroupFirstKey(SimpleString groupFirstKey) setGroupRebalance(Boolean groupRebalance) setGroupRebalancePauseDispatch(Boolean groupRebalancePauseDispatch) setInternal(Boolean internal) setLastValue(Boolean lastValue) setLastValueKey(String lastValueKey) setLastValueKey(SimpleString lastValueKey) setMaxConsumers(Integer maxConsumers) Converts the inputStringand invokessetName(SimpleString)setName(SimpleString name) Set the name.setNonDestructive(Boolean nonDestructive) setPurgeOnNoConsumers(Boolean purgeOnNoConsumers) setRingSize(Long ringSize) setRoutingType(RoutingType routingType) setTemporary(Boolean temporary) setTransient(Boolean _transient) setUser(SimpleString user) toJSON()This method returns a JSON-formattedStringrepresentation of thisQueueConfiguration.toString()
-
Field Details
-
ID
- See Also:
-
NAME
- See Also:
-
ADDRESS
- See Also:
-
ROUTING_TYPE
- See Also:
-
FILTER_STRING
- See Also:
-
DURABLE
- See Also:
-
USER
- See Also:
-
MAX_CONSUMERS
- See Also:
-
EXCLUSIVE
- See Also:
-
GROUP_REBALANCE
- See Also:
-
GROUP_REBALANCE_PAUSE_DISPATCH
- See Also:
-
GROUP_BUCKETS
- See Also:
-
GROUP_FIRST_KEY
- See Also:
-
LAST_VALUE
- See Also:
-
LAST_VALUE_KEY
- See Also:
-
NON_DESTRUCTIVE
- See Also:
-
PURGE_ON_NO_CONSUMERS
- See Also:
-
ENABLED
- See Also:
-
CONSUMERS_BEFORE_DISPATCH
- See Also:
-
DELAY_BEFORE_DISPATCH
- See Also:
-
CONSUMER_PRIORITY
- See Also:
-
AUTO_DELETE
- See Also:
-
AUTO_DELETE_DELAY
- See Also:
-
AUTO_DELETE_MESSAGE_COUNT
- See Also:
-
RING_SIZE
- See Also:
-
CONFIGURATION_MANAGED
- See Also:
-
TEMPORARY
- See Also:
-
AUTO_CREATE_ADDRESS
- See Also:
-
INTERNAL
- See Also:
-
TRANSIENT
- See Also:
-
AUTO_CREATED
- See Also:
-
FQQN
- See Also:
-
-
Constructor Details
-
QueueConfiguration
Deprecated, for removal: This API element is subject to removal in a future version.Useof(String)instead. -
QueueConfiguration
Deprecated, for removal: This API element is subject to removal in a future version.Useof(QueueConfiguration)instead.- Parameters:
o- create a copy of this
-
QueueConfiguration
Deprecated, for removal: This API element is subject to removal in a future version.Useof(SimpleString)instead.Instantiate this object and invokesetName(SimpleString)- Parameters:
name- the name to use for the queue- See Also:
-
QueueConfiguration
Deprecated, for removal: This API element is subject to removal in a future version.Useof(String)instead.Instantiate this object and invokesetName(SimpleString)- Parameters:
name- the name to use for the queue- See Also:
-
-
Method Details
-
of
Instance factory which invokessetName(SimpleString)- Parameters:
name- the name to use for the queue- See Also:
-
of
Instance factory which invokessetName(SimpleString)- Parameters:
name- the name to use for the queue- See Also:
-
of
Returns theQueueConfigurationinstance which is a copy of the input parameter.- Returns:
- the
QueueConfigurationinstance which is a copy of the input parameter
-
set
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
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
-
setId
-
getAddress
Returns the name of the address; if the address isnullthen return the value ofgetName().- Returns:
- the name of the address; if the address is
nullthen return the value ofgetName()
-
setAddress
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
Converts the inputStringand invokessetAddress(SimpleString)- See Also:
-
getName
-
setName
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
Converts the inputStringand invokessetName(SimpleString)- See Also:
-
getRoutingType
-
setRoutingType
-
getFilterString
-
setFilterString
This sets theSimpleStringvalue that will be used to create aFilterfor theQueueimplementation on the broker. The filter's syntax is not validated here.- Parameters:
filterString- the filter to use; an empty value or a value filled with whitespace is equivalent to passingnull- Returns:
- this
QueueConfiguration
-
setFilterString
- See Also:
-
isDurable
defaults totrue -
setDurable
-
getUser
-
setUser
-
setUser
-
getMaxConsumers
-
setMaxConsumers
-
isExclusive
-
setExclusive
-
isLastValue
-
setLastValue
-
getLastValueKey
-
setLastValueKey
-
setLastValueKey
-
isNonDestructive
-
setNonDestructive
-
isPurgeOnNoConsumers
-
setPurgeOnNoConsumers
-
isEnabled
-
setEnabled
-
getConsumersBeforeDispatch
-
setConsumersBeforeDispatch
-
getDelayBeforeDispatch
-
setDelayBeforeDispatch
-
getConsumerPriority
-
setConsumerPriority
-
isGroupRebalance
-
setGroupRebalance
-
isGroupRebalancePauseDispatch
-
setGroupRebalancePauseDispatch
-
getGroupBuckets
-
setGroupBuckets
-
getGroupFirstKey
-
setGroupFirstKey
-
setGroupFirstKey
-
isAutoDelete
-
setAutoDelete
-
getAutoDeleteDelay
-
setAutoDeleteDelay
-
getAutoDeleteMessageCount
-
setAutoDeleteMessageCount
-
getRingSize
-
setRingSize
-
isConfigurationManaged
defaults tofalse -
setConfigurationManaged
-
isTemporary
defaults tofalse -
setTemporary
-
isAutoCreateAddress
-
setAutoCreateAddress
-
isInternal
defaults tofalse -
setInternal
-
isTransient
defaults tofalse -
setTransient
-
isAutoCreated
defaults tofalse -
setAutoCreated
-
isFqqn
Based on if the name or address uses FQQN when set defaults tofalse -
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
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).- Returns:
- the
QueueConfigurationcreated from the JSON-formatted inputString
-
equals
-
hashCode
public int hashCode() -
toString
-
of(String)instead.