qpid-config.xml
You use the file <MB_HOME>/repository/conf/advanced/qpid-config.xml
to configure WSO2 Message Broker. Following is a tree of the XML elements in the file:Â Â
<broker> <prefix> <work> <conf> <plugin-directory> <cache-directory> <connector> <ssl> <enabled> <sslOnly> <keystorePath> <keystorePassword> <qpidnio> <protectio> <enabled> <readBufferLimitSize> <writeBufferLimitSize> <transport> <port> <sslport> <socketReceiveBuffer> <socketSendBuffer> <management> <enabled> <jmxport> <ssl> <enabled> <keyStorePath> <keyStorePassword> <advanced> <filterchain> <enablePooledAllocator> <enableDirectBuffers> <framesize> <compressBufferOnQueue> <enableJMSXUserID> <locale> <security> <pd-auth-manager> <principal-database> <class> <attributes> <attribute> <name> <value> <msg-auth> <virtualhosts> <heartbeat> <delay> <timeoutFactor> <queue> <auto_register> <viewMessageCounts> Â <status-updates> <clustering> <enabled> <OnceInOrderSupportEnabled> <externalCassandraServerRequired> <externalZookeeperServerRequired> <coordination> <ZooKeeperConnection> <ReferenceTime> <tuning> <messageBatchSizes> <maxNumberOfUnackedMessages> <maxNumberOfReadButUndeliveredMessages> Â <messageBatchSizeForSubscribersQueues> <messageBatchSizeForSubscribers> <globalQueueWorkerMessageBatchSize> <contentPublisherMessageBatchSize> <medataDatePublisherMessageBatchSize> <messageBatchSizeForBrowserSubscriptions> Â <threading> <flusherPoolSize> <subscriptionPoolSize> <internalSequentialThreadPoolSize> <andesInternalParallelThreadPoolSize> <publisherPoolSize> Â <waitTimes> <maxAckWaitTime> <queueMsgDeliveryCurserResetTimeInterval> Â <maxAckWaitTimeForBatch> <queueWorkerInterval> <pubSubMessageRemovalTaskInterval> <contentRemovalTaskInterval> <contentRemovalTimeDifference> <topicPublisherTaskInterval> <virtualHostSyncTaskInterval> <maximumNumberOfMessageDeliveryAttempts>
Click an element below for more information about that element.
<broker>
This is the top level element of qpid-config.xml file. It contains all the other elements needed to configure WSO Message Broker. The setting of the prefixes for QPID_HOME and QPID_WORK allows environment variables to be used throughout the config.xml and removes the need for hard coding of paths in this file.
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<prefix> | Â | Â | Â | Â | Mandatory | Â |
<work> | Â | Â | Â | Â | Mandatory | Â |
<conf> | Â | Â | Â | Â | Mandatory | Â |
<plugin-directory> | Â | Â | Â | Â | Mandatory | Â |
<cache-directory> | Â | Â | Â | Â | Mandatory | Â |
<connector>
Defines connection parameters.
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<qpidnio> | Enable or disabe NIO support for the broker | Boolean | false |  true/false | Mandatory |  |
<transport> | transport type to use | String | nio |  | Mandatory |  |
<port> |  | Int | 5672 |  | Mandatory |  |
<socketReceiveBuffer> | Â | Int | 32768 | Â | Mandatory | Â |
<socketSendBuffer> |  | Int | 32768 |  | Mandatory |  |
<ssl>
This comes under <connector>. SSL section allows configuration of SSL and related keystore settings. By default SSL is enabled with default parameters. If sslOnly is set to 'true' Non-SSL port will be disabled.
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<enabled> | Â If SSL is enabled for Message Broker server | Â Boolean | true | Â true/false | Â Mandatory | Â |
<sslOnly> | Â The sslOnly option is included here for completeness however this will disable the unencrypted port and leave only the SSL port listening for connections. | Â Boolean | false | Â true/false | Â Mandatory | Â |
<keystorePath> |  Path for keystore directory |  String | repository/resources/security/wso2carbon.jks  | repository/resources/security/wso2carbon.jks |  Mandatory |  |
<keystorePassword> | Â Password for keystore | Â String | Â wso2carbon | Â wso2carbon | Â Mandatory | Â |
<management>Â
This configuration option is there for managing JMX console.Â
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<enabled> | This element allows the user to switch the connectivity of the management console on/off i.e. if the enabled tag is set to false you will not be able to connect a management console to this broker instance. | Boolean | true | true/false | Mandatory | Â |
<jmxport> | Â The JMX Management port is set to 8999 by default but it can be changed here in the XML. | Int | 8999 | N/A | Mandatory | Â |
<ssl> | SSL related configurations for management console. | Â | Â | Â | Â | Â |
       <enabled> | Sub element of <ssl>. Whether SSL is enabled for management console | Boolean | false | true/false | Mandatory |  |
       <keyStorePath> | Sub element of <ssl>. Update below path to your keystore location, or run the bin/create-example-ssl-stores(.sh|.bat) script from within the etc/ folder to generate an example store with self-signed cert | String | ${conf}/qpid.keystore | N/A | Mandatory |  |
       <keyStorePassword> | Password for the keystore provided. | String | password | N/A | Mandatory |  |
<advanced>
The elements in this section are used under the covers in the broker. At present, we do not recommend any changes to these settings.
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<filterchain> | Â | Â Boolean | Â true | true/false | Mandatory | Â |
<enablePooledAllocator> | Â | Â Boolean | Â false | true/false | Mandatory | Â |
<enableDirectBuffers> | Â | Â Boolean | Â false | true/false | Mandatory | Â |
<framesize> | Â | Â Int | Â 65535 | N/A | Mandatory | Â |
<compressBufferOnQueue> | Â | Â Boolean | Â false | true/false | Mandatory | Â |
<enableJMSXUserID> | Â | Â Boolean | Â false | rue/false | Mandatory | Â |
<locale> | Â | String | en_US | N/A | Mandatory | Â |
<security>
The security section specifies exactly one authentication manager (responsible for determining that a user's credentials are correct) and zero or more access plugins (limits what the user may and may not do). No configuration change is needed here.
<virtualhosts>
This element allows you to specify a location for the virtualhosts.xml file that you wish to use. If you are not using a subdirectory under $QPID_HOME you can provide a fully qualified path instead. For more information on the content of the virtualhosts.xml file please seeÂ
<heartbeat>
The Qpid broker sends an internal (only) heartbeat. This element allows configuration of the frequency of this heartbeat. It is needed to configure a proper delay for the heartbeat value if the connections are going to stay idle for a long time.All configurations related to this is described here.
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<delay> | Heart beating delay | Â Int | Â 0 | N/A | Â | Â |
<timeoutFactor> | Heat beat time out factor | Â Float | Â false | N/A | Â | Â |
<queue>
This should NOT be changed lightly as it sets the broker up to automatically bind queues to exchanges. It could theoretically be used to prevent users creating new queues at runtime, assuming that you have created all queues/topics etc at broker startup. However, best advice is to leave unchanged for now. Enabling the <viewMessageCounts> element in this section will directly effect to broker performance hence make it 'true' only if a performance degrade is acceptable.
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<auto_register> | Whether to register the queue name in server or not at the time of it is created. | Boolean | true | true/false | Â | Â |
<viewMessageCounts> | Activates the queue message counters and message count of each queue wil be displayed in the admin console by default. When this is 'false' message count can be read from console on user demand. | Boolean | false | true/false | optional | Â |
<tuning>
 Under this tag all tuning parameters for WSO2 Message Broker is defined. Threading wait times, Thread pool sizes, Message batch sizes can be configured to suit the memory availability and the performance expected. There is a balance between performance, reliability, and the resources in hand.
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<maximumNumberOfMessageDeliveryAttempts> | Â This is used to configure how many times a configured message should be attempted to deliver to the subscriber. If there is no acknowledgement came from the client or there were rollbacks for a "Transacted" message delivery, after this number of delivery attempts has breached, message will be dropped from the store and it will be lost. | Â Int | Â 10 | Â N/A | Â Mandatory | Â |
<clustering>
WSO2 Message Broker can be clustered to meet scalability requirements. There are a few clustering patterns supported by WSO2 MB with Cassandra and Zookeeper servers are also clustered. See Clustered Deployment for more information. Â
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<enabled> | Configure the broker to start in clustered mode or in stand-alone mode. The value "true" indicates clustered mode whereas "false" indicate the standalone mode. | String | false | true/false | Mandatory | Â |
<OnceInOrderSupportEnabled> | Generally broker will try its best to deliver messages in order, but time to time this order can be broken if subscriber is receiving messages while sending messages also happen at the same time. Setting this configuration to "true", we ensure messages are delivered strictly in order (even when clustered), but there might be a performance deduction w:r:t the default mode. | String | false | true/false | Mandatory | Â |
<coordination> | In clustered mode, this configuration is important. | Â | Â | Â | Â | Â |
<ZooKeeperConnection> | Sub-element of <coordination>. As WSO2 Message Broker uses Apache ZooKeeper to make synchronizations and notifications in clustered environment, it should be pointed to a running ZooKeeper server configuring this parameter. | String <ip>:<port> | 127.0.0.1:2181 | N/A | Optional | Â |
<ReferenceTime> | Sub-element of <coordination>. When message IDs are generated internally during clustered deployment this configuration value is used. | String (yyyy-mm-dd hh:mm:ss) | 2012-02-29 08:08:08 | N/A | Mandatory | Â |
<messageBatchSizes>
This configuration is found under <tuning>. In Broker operations at various places messages are read or written, either to memory or to Cassandra Database. In order to handle performance and to cope with the memory requirements, it might be required to configure sizes of message batches that should be handled.Â
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<maxNumberOfUnackedMessages> | Message delivery from server to the client will be paused temporarily if number of delivered but unacknowledged message count reaches this size. Should be set considering message consume rate. | Int | 1000 | N/A | Mandatory | Â |
<maxNumberOfReadButUndeliveredMessages> | Maximum number of undelivered messages per a queue that can have in memory. | Int | 1000 | N/A | Mandatory | Consider allocated memory size when increasing this value |
<messageBatchSizeForSubscribersQueues> | Message Batch size moved to Subscriber queues from the Global Queue at once. Increasing this values increase the chance of breaking in order delivery guarantee but performance will be improved | Int | 20 | N/A | Mandatory | Â |
<messageBatchSizeForSubscribers> | Message Batch size Taken in to memory for a one time to deliver to subscribers. | Â | Â | Â | Â | Â |
<default> | sub-element of <messageBatchSizeForSubscribers>. Initially this value will be taken as the batch size of messages to read into memory. | Int | 50 | N/A | Mandatory | This should be a value between max and min values below |
<max> | sub-element of <messageBatchSizeForSubscribers>. Dynamically broker will increase batch size upto this value if there are many messages. | Int | 300 | N/A | Mandatory | Consider size of a message when increasing. |
<min> | Broker will try to read at least this number of messages into memory. | Int | 20 | N/A | Mandatory | Consider the performance when decreasing. |
<globalQueueWorkerMessageBatchSize> | Maximum number of message taken it to memory when transering from interal queues to node wise queues. We need to increase the memory allocation from the broker if we are to increase this. | Int | 700 | N/A | Mandatory | Increasing this will increase the consumer throughout |
<contentPublisherMessageBatchSize> | Max number of Message chunks to buffer before message contents are written to the cassandra | Int | 200 | N/A | Mandatory | Â |
<medataDatePublisherMessageBatchSize> | Max number of Messages meta data to buffer before message Meta data are written to the cassandra | Int | 200 | N/A | Mandatory | Â |
<messageBatchSizeForBrowserSubscriptions> | Maximum number of messages to be fetched using Andes message browser when browsing queues | Int | 200 | N/A | Mandatory | Number of entries attempted to load for Queue Browser Window will depend on this entry. |
Â
<threading>
Configurations to define thread pool sizes for WSO2 Message Broker
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<flusherPoolSize> | This is the Thread pool size which will be used by the "Sender Task" to send messages asynchronously to the subscriber. | Int | 10 | N/A | Mandatory | You will have to consider the value of parameter messageBatchSizeForSubscribers when configuring this pool size. |
<subscriptionPoolSize> | This is the Thread pool that is used by the Fast Subscription Handing implementation. Make this to a higher number if there are a lot of subscriptions to the system at a given time | Int | 20 | N/A | Mandatory | Â |
<internalSequentialThreadPoolSize> | This is the Thread pool size which will be used by the internal Queue copy Task to move messages to from Global Queue to Node queue in Cassandra tables. | Int | 5 | N/A | Mandatory | Increase this into a higher value if there are lots of subscriptions in the system. |
<andesInternalParallelThreadPoolSize> | This is the Thread pool size which will be used by the Andes core to schedule its internal parallel tasks | Int | 50 | N/A | Mandatory | Â |
<publisherPoolSize> | This is the Thread pool size which will be used by the queue delivery workers. | Int | 50 | N/A | Mandatory | Increase this into a higher value if there are lots of unique queues to the system. |
Â
<waitTimes>Â
These are time based configurations for WSO2 Message Broker.Â
Configurable Sub Elements
Element Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
<maxAckWaitTime> | Max wait time for a acknowledgement for a given message from the client. After this time is breached broker will try to redeliver the message again. | Seconds | 10 | N/A | Mandatory |  |
<maxAckWaitTimeForBatch> | Max wait time for a acknowledgement for a batch of messages that that is sent from subscribers | Seconds | 120 | N/A | Mandatory | Â |
<queueMsgDeliveryCurserResetTimeInterval> | Time to wait until older messages in queues start being delivered. After this much of time messages from beginning of the queue will be starting to delivered. If some message is already sent, but unacked, it will be redelivered if <maxAckWaitTime> is breached. | Milliseconds | 60000 | N/A | Mandatory | Â |
<queueWorkerInterval> | Running interval for queue worker thread. | Milliseconds | 500 | N/A | Mandatory | Â |
<pubSubMessageRemovalTaskInterval> | Messages addressed to topics are buffered to be removed. Thread to clear off messages from store message will be run once this time. | Milliseconds | 5000 | N/A | Mandatory | Â |
<contentRemovalTaskInterval> | Content of messages which are delivered to the client is buffered to be removed. Thread to clear the content of delivered messages will be run once this time. | Milliseconds | 4000 | N/A | Mandatory | Â |
<contentRemovalTimeDifference> | Broker will wait until a timeout happens before removing messages delivered or not delivered for Topic subscribers. | Seconds | 120 | N/A | Mandatory | Â |
<topicPublisherTaskInterval> | The Running interval for Topic Publisher Task delivering messages to subscribers for topics. | Milliseconds | 1000 | N/A | Mandatory | Â |
<virtualHostSyncTaskInterval>Â | Virtual host sync interval for the Virtual host syncing Task which will sync the Virtual host details across the cluster | Seconds | 3600 | N/A | Mandatory | Â |
Â
Â