public class JCSMPGlobalProperties extends Object implements Cloneable, Serializable
JCSMPGlobalProperties
instance, once populated,
must be set on JCSMPFactory
, as in the following example:
JCSMPGlobalProperties gp = new JCSMPGlobalProperties(); // override default properties gp.setConsumerDispatcherQueueSize(10000); JCSMPFactory.onlyInstance().setGlobalProperties(gp);
Global properties may only be set before any sessions have been created from
the JCSMPFactory
.
Constructor and Description |
---|
JCSMPGlobalProperties()
Constructs a new instance with default values.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
int |
getConsumerDefaultFlowCongestionLimit()
Gets the default consumer's congestion limit.
|
int |
getConsumerDefaultFlowUncongestedLimit()
Gets the default consumer's uncongested threshold (calculated as 0.2 *
getConsumerDefaultFlowCongestionLimit() ). |
int |
getConsumerDispatcherQueueSize()
Gets the size of the consumer notification dispatcher queue.
|
int |
getContentBufferResizeMultiplier()
Get content buffer resize multiplier.
|
int |
getContentBufferSizeDefault()
Get content buffer size default
|
int |
getProducerDispatcherQueueSize()
Gets the size of the producer notification dispatcher queue.
|
int |
getReconnectFreqManagerMaxReconnects()
Gets the maximum number of reconnects to allow before the reconnect
frequency manager kills a connection.
|
void |
setConsumerDefaultFlowCongestionLimit(int consumerDefaultFlowCongestionLimit)
Sets the the default consumer's congestion limit.
|
void |
setConsumerDispatcherQueueSize(int consumerDispatcherQueueSize)
Sets the size of the consumer notification dispatcher queue.
|
void |
setContentBufferResizeMultiplier(int multiplier)
Set content buffer multiplier (the default is 25).
|
void |
setContentBufferSizeDefault(int sz)
Set content buffer size default (the default is 4096).
|
void |
setProducerDispatcherQueueSize(int producerDispatcherQueueSize)
Sets the size of the producer notification dispatcher queue.
|
void |
setReconnectFreqManagerMaxReconnects(int reconnectFreqManagerMaxReconnects)
Sets the maximum number of reconnects to allow before the reconnect
frequency manager kills a connection.
|
public JCSMPGlobalProperties()
public int getProducerDispatcherQueueSize()
JCSMPGlobalProperties.setProducerDispatcherQueueSize(int)
public void setProducerDispatcherQueueSize(int producerDispatcherQueueSize)
The producer notification dispatcher queue is used by the API to notify
streaming producers of message acknowledgements and message publishing
exceptions through their
JCSMPStreamingPublishCorrelatingEventHandler
. Internal API
threads append notifications to the queue, blocking, if necessary, until
space is available. There is one such queue per Context
.
producerDispatcherQueueSize
- The queue size.public int getConsumerDispatcherQueueSize()
JCSMPGlobalProperties.setConsumerDispatcherQueueSize(int)
public void setConsumerDispatcherQueueSize(int consumerDispatcherQueueSize)
The API uses the consumer notification dispatcher queue to notify
asynchronous consumers of messages and exceptions through their
XMLMessageListener
. Internal API threads append notifications to
the queue, blocking if necessary until space is available. There is one
such queue per Context
.
The API allocates a thread to service this queue and dispatch
notifications to an application's XMLMessageListeners
. If an
XMLMessageListener
does not always return control quickly
and the notification queue fills up, then other API threads can become
blocked when attempting to enqueue notifications to this queue.
To avoid this possibility, applications should ensure this queue is large
enough to buffer the maximum number of notifications that can be
generated by all consumer flows (guaranteed flows as well as direct
consumers) contained in all sessions in a Context
, i.e.,
queueSize > Σ (f.windowSize) + (FCL * Nconsumers) f ∈ GDFlowsWhere
GDFlows : Set of allguaranteed delivery consumer flows
in a Context FCL : Default consumerflow congestion limit
Nconsumers: Number ofdirect consumers
in a Context
consumerDispatcherQueueSize
- queue sizepublic int getConsumerDefaultFlowCongestionLimit()
JCSMPGlobalProperties.setConsumerDefaultFlowCongestionLimit(int)
public void setConsumerDefaultFlowCongestionLimit(int consumerDefaultFlowCongestionLimit)
If a JCSMPXMLMessageConsumer
accumulates more than this number of
messages not yet handled by the consuming application, it will
temporarily suspend reading from the underlying TCP connection.
consumerDefaultFlowCongestionLimit
- The new congestion limit to set.public int getConsumerDefaultFlowUncongestedLimit()
getConsumerDefaultFlowCongestionLimit()
).public int getReconnectFreqManagerMaxReconnects()
JCSMPGlobalProperties.setReconnectFreqManagerMaxReconnects(int)
public void setReconnectFreqManagerMaxReconnects(int reconnectFreqManagerMaxReconnects)
To prevent competing clients with the same name kicking each other out from the appliance indefinitely, the Messaging API kills connections when they reconnect too fast to the appliance. This is normally due to a misconfiguration of application connection and authentication parameters.
The threshold is the configured number of reconnections allowed in a four second period. If this number is exceeded, the connection is closed.
reconnectFreqManagerMaxReconnects
- Maximum number of reconnections to allow in a four second
period.public int getContentBufferResizeMultiplier()
public void setContentBufferResizeMultiplier(int multiplier)
multiplier
- content buffer resize multiplierpublic int getContentBufferSizeDefault()
public void setContentBufferSizeDefault(int sz) throws InvalidPropertiesException
sz
- content buffer size defaultInvalidPropertiesException
Copyright 2004-2024 Solace Corporation. All rights reserved.