This documentation is for WSO2 Message Broker version 2.0.0. View documentation for the latest release.

Message Broker Queues - User Guide

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
  • Browse queue information
  • Delete a queue

Add a queue

adding queues

                                                                                                                                                                how-to-add-a-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. Also note that queue name should not begin with character sequence "tmp_" as it is used by the broker for internal purposes. This will be the identifier for the queue you have created.

 

add queue success message

                                                                                 add-queue-success-message

 

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 the approximate 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.

 

browse queues

                                                                                                                                                                    browsing-created-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.

 

queue successfully deleted message

                                                                            successful-queue-removal 

 

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. Also if a user need to create a queue called "myQueue" using an external JMS client under tenant domain "a.com", he should use "a.com/myQueue" as the queue name.

 

                                                                           tenant-specific-queues

 

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 <tunining_message_broker>for more detail.


Copyright © WSO2 Inc. 2005-2013