Interface QueueConfig
- All Superinterfaces:
Config
Queues may be configured both server side and client side (if required).
Queue properties can not be changed once the server has started.
- Since:
- 4.4
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets whether the queue has conflation enabled by default.int
Gets the lower threshold.long
Gets the maximum size of the outbound message queue in bytes.int
Gets the maximum queue depth.getName()
Gets the queue definition name.int
Gets the upper threshold.void
setConflates
(boolean conflates) Sets whether the queue has conflation enabled by default.void
setLowerThreshold
(int threshold) Sets the lower threshold.void
setMaximumBytes
(long maximumBytes) Sets the maximum size of the outbound message queue in bytes.void
setMaximumDepth
(int maximumDepth) Sets the maximum depth of the queue.void
setUpperThreshold
(int threshold) Sets the upper threshold.
-
Method Details
-
getName
String getName()Gets the queue definition name.- Returns:
- queue definition name
-
setMaximumDepth
Sets the maximum depth of the queue.If the queue depth exceeds this maximum, the server may attempt to free some space by compacting the message queue. If the number of messages queued remains above this maximum, the session will be closed to free memory. If not specified, it defaults to
Integer.MAX_VALUE
.This is considered separately from
SessionConfig.getMaximumQueuedBytes()
andgetMaximumBytes()
.- Parameters:
maximumDepth
- the maximum queue depth, must be positive- Throws:
ConfigException
- if the property can not be set
-
getMaximumDepth
int getMaximumDepth()Gets the maximum queue depth.- Returns:
- the maximum queue depth, a positive integer
-
setConflates
Sets whether the queue has conflation enabled by default.The default setting is true. Conflation can be enabled or disabled for individual sessions at runtime. The behavior when conflation is enabled is determined by the conflation policies of topics.
- Parameters:
conflates
- true if the queue can be conflated by default- Throws:
ConfigException
- if unable to set the conflates property
-
conflates
boolean conflates()Gets whether the queue has conflation enabled by default.- Returns:
- true if queue can be conflated by default
-
setUpperThreshold
Sets the upper threshold.When the upper percentage of the queue reached, any queue listeners will be notified. This currently only has an effect server side.
By default the upper threshold will not be notified.
- Parameters:
threshold
- the upper threshold percentage. A value of -1 means that upper threshold will not be notified otherwise the value must be in the range 1 to 100 and greater than the lower threshold.- Throws:
ConfigException
- if the property can not be set
-
getUpperThreshold
int getUpperThreshold()Gets the upper threshold.- Returns:
- the upper threshold
-
setLowerThreshold
Sets the lower threshold.After an upper threshold event has occurred, this specifies the percentage queue size at which listeners for queue threshold notifications will be notified.
This only has an effect when used in conjunction with the upper threshold.
By default no lower threshold notification would occur.
- Parameters:
threshold
- the lower threshold percentage. A value of -1 means that lower threshold will not be notified otherwise the value must be in the range 0 to 100 and less than the upper threshold.- Throws:
ConfigException
- if the property can not be set
-
getLowerThreshold
int getLowerThreshold()Gets the lower threshold.- Returns:
- the lower threshold
-
setMaximumBytes
Sets the maximum size of the outbound message queue in bytes.If the number of bytes queued exceeds this maximum, the server may attempt to free some memory by compacting the message queue. If the number of bytes queued remains above this maximum, the session will be closed to free memory. If not specified, it defaults to
Long.MAX_VALUE
.This is considered separately from
SessionConfig.getMaximumQueuedBytes()
andgetMaximumDepth()
.- Parameters:
maximumBytes
- the maximum queue bytes, must be positive- Throws:
ConfigException
- if the property can not be set- Since:
- 6.1
-
getMaximumBytes
long getMaximumBytes()Gets the maximum size of the outbound message queue in bytes.- Returns:
- the maximum size of the outbound message queue in bytes
- Since:
- 6.1
-