Message Broker Queues

Queues is a feature provided with WSO2 Message Broker which enables users to publish messages and receive them in the order that they are sent.These queues are natively persistent, which indicates even after shutting down the server or a sudden crash messages will be remain in the queue ready to be delivered.

Operations available for queues are:

Add a queue

Figure 1: Add Queue

Using this operation users can add queues to the system. They get created in message broker server, ready for message receiving from and sending to client applications. When creating the queue a meaningful name should be given without any "/" literals included. This will be the identifier for the queue you have created.

Figure 2: Add Queue Success

Note that external applications can create queues programatically as well.

Once a queue is added user will be redirected to queue information browsing page.

Browse queue information

The table shows all the queues available in message broker server. It also shows message count for each queue, number of messages in persistent state not delivered to the consuming client.

Queues created by external client applications will be listed here with message count in the same way. But in order to view them you should be in "Super Tenant" (default) mode.

Figure 3: Available Queues

Delete a Queue

Users can remove one or more queues from the server. All the messages persisted with that queue will be lost on queue deletion. A Success message will pop-up on successful queue deletion, and can be verified by looking at the available queue list.

Figure 4: Deleting Queues

Tenant-specific Queue Creation

If you are in some tenant domain other than "Super Tenant" for example "a.com", when you create a queue in above mentioned way (eg:myQueue) the queue created in browser will be "a-com/myQueue". You will notice this when you are directed to queue browsing page. If the user intend to send to and consume from the queue using an external client application, the physical queue name (i.e "a-com/myQueue") should be used.

Figure 5: Queues Added By Tenants

Distributed Queues in Clustered Mode

When you are running a few instances of WSO2 Message Broker, queues are always distributed. At a particular moment a queue is owned by some node in a cluster. When some node fails in the cluster, if client applications are configured to use "fail-over", it will be able to send and consume messages from the cluster without any failures or any message loses. Clustering operations and synchronizing messages across the cluster is fully transparent to the user.

Advanced Tuning of Queue Properties and Performance

There is a lot of configurations can be done while configuring an instance of WSO2 MB to improve performance and functionality. Please refer Wikis for more detail.