Unknown macro: {search-box}
Child pages
  • Managing Queues

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

                                                                                                                                                                                                                                                                                                                                     
||
Skip to end of metadata
Go to start of metadata

You can use the management console to manage queues, including adding and removing queues, displaying their contents, and more. You can also specify advanced queue configurations to improve performance and functionality when you set up an instance of WSO2 Message Broker. For more information, see qpid configurations.

If you have multiple instances of Message Broker running, queues are distributed, and each queue is owned by a node in the cluster. If the node fails, and the client application is configured to use failover, it will be able to send and consume messages from the cluster without any failures or message loss. Clustering operations and synchronizing messages across the cluster are fully transparent to the user.

Following are the tasks you can perform to manage queues in the management console:

Adding queues

The following steps describe how to add a queue using the management console. External applications can also add queues programmatically.

  1. On the Main tab in the management console, click Queues -> Add.
  2. In the Add Queue dialog, enter a unique, meaningful name for the queue (do not include "/" literals, and do not prefix the name with "tmp_", which is reserved for internal use), and then click Add Queue

The queue is created on the Message Broker server and is now ready to receive messages and send messages to client applications. It appears in the Queue List dialog, as described in the next section.

Browsing queues 

To view the queues that are available on the Message Broker server, choose Queues -> Browse on the Main tab.

The Queue List table provides details about each queue.

  • The Message Count field displays the approximate number of persisted messages that have not been delivered to the client.
  • To display the contents of the queue, click Browse in the View column.
  • To send sample text messages to the queue, click Send to in the Operations column.
  • To delete all the messages in the queue, click Purge in the Operations column.
  • To delete the queue itself, click Delete in the Actions column.

Tenant-specific queues

Queues created by external client applications are listed the same way in the table when you are in the default "Super Tenant" mode. When a queue is created from a tenant other than the super tenant, the queue's name will be prefixed with the tenant domain name. For example, if the tenant domain is "a.com" and the queue name is "myQueue", the queue name will be displayed as "a.com/myQueue".

When sending or consuming messages to/from this queue using an external client application, or when creating a queue from an external JMS client, the queue name must include the domain prefix (such as "a.com/myQueue" in the previous example). If the external client application needs the tenant username, which is in TENANT_USER@TENANT_DOMAIN format, to authenticate, replace the '@' symbol in the tenant-specific username with the ' ! ' symbol.

Displaying queue contents

When browsing queues, click Browse in a queue's View column to display the messages inside that queue.

The table shows information about each message in the queue, including the content type and timestamp of the message. To view the message's body content, click more... in the Message Summary column.

By default, WSO2 Message Broker displays up to 200 messages in the queue content window. If you need to display more messages, you can increase the <messageBatchSizeForBrowserSubscriptions> value in the <MB_HOME>/repository/conf/advanced/qpid-config.xml file.

Sending messages to queues 

When browsing queues, click Send to in a queue's Operations column to send sample text messages to the corresponding queue.

The following properties are supported in the 'Send Message UI'.

  • Correlation ID: The correlation ID for the message, which can be an application-specific 'String' value set by the user. This is not a mandatory field. This property is used for linking one message with another. according to the JMS specification, it typically links a reply message with its requesting message..
  • JMS Type: A 'String' value to define the message type if required. This is not a mandatory field.
  • Number of Messages (Required) : The amount of sample messages to be sent to the queue. This field is mandatory.
  • Duration to Expire:  The time-to-live value for the messages as specified by the user.  This is not a mandatory field.
  • Message Body: The text content of the sample message. This is not a mandatory field as the body will be containing a text called 'Type Message Here..' in case user doesn't add a message body.

To send the sample message, enter the number of messages to send, optionally fill in the other message properties, and then click Send Message.You can then verify the messages were sent correctly by displaying the queue contents.

Purging queues

When browsing queues , click Purge in a queue's Operations column to remove all the messages from the queue and set the message count to zero.

Deleting queues 

When browsing queues, click Delete in a queue's Actions column to delete that queue and all its persisted messages from the server.

  • No labels