WSO2 MB - User Guide

[Documentation Index]

WSO2 Message Broker(MB) User Guide

The goal of this guide is to provide guidelines to be followed in order to get familiar with WSO2 Message Broker and the procedure of using the features provided by the product.

Contents

Introduction to Message Broker

This gives a brief introduction of how message broker can be used in publishing and receiving messages.

WSO2 Message Broker is basically consist of two major features. They are:

Pub/Sub Feature

This feature of the WSO2 Message Broker provides the facility for users to route messages to the required users. If we are explaining deeply, there is a concept called 'Topic' and message routing is done on the base of that topic. When a particular user want to publish a message to a particular sector , he creates a topic with a name related to the messages that he is going to pulish. As an example, if a particular user want to publish messages related with sports news, he can create a topic with the name 'SportsNews' and publish the messages to that topic.

When another particular user is interested on any topic in the topic tree, he can subscribe to that topic and receive messages which are published to that topic by the publisher. As in the above example, when a particular user is interested on sports, he can subscribed to the topic 'SportsNews' and get messages published to that topic.

Pub/Sub Message Flow

Message box Feature

This feature of the WSO2 Message Broker provides the facility for users to store messages in an intermediate location which were sent by some one else to the user and access them on demand. In order to have this feature, WSO2 Message Broker uses a Message Queue and all the operations are carried out on that message queue. This message box feature is like the email box we have, more clearly , any one can send messages to Queue and only the owner of the queue can consume the messages stored in that queue.

Queue Message Flow

How to use Pub/Sub Feature

In WSO2 Message Broker , Pub/Sub feature is one of the two major features. Inorder to use this feature , it is needed to create a Topic and subscribe to it.

How to use Message box(SQS) feature

Message box is a simple queue where user can store, retrieve and delete messages. Message box provides the Simple Queue Service(SQS) operations. In SQS, When a message is received by an user, that message is unaccessible for a specified time duration, and this message is not visible for other users till that specified time duration is over. If the message received user did not delete the message in that time duration, the message is visible for other users. This time duration is named as visibility timeout.

For more information regarding SQS, please refer links provided at references.

  • Create a message box
  • Click on the add menu under the item messageboxes(SQS). Then provide a name for the message box and a default visibility timeout value in seconds. If the message box is created successfully, It will be displayed at the message box list.

    Create Message Box

  • List message boxes
  • To view created message boxes, click on list menu under item messageboxes(SQS).

    To view message box content, click on message box name

    To delete message box, click on delete icon at the right hand side. A successful message will be prompted.

    List Message Boxes

  • Using the message box
  • User can view the content of the message box by going through link in list view. In message box page, users can do following things.

    View messages which are retrievable under content of message box.

    Add messages to message box. These messages are added under retrievable messages of message box.

    Add Message To Message Box

    Retrieve messages from message box. User can set visibility timeout value for retrieving messages and the number of messages to retrieve. Retrieved messages are added under retrieved messages.

    Retrieve Messages From Message Box

    View retrieved messages from message box. These messages are displayed under the table retrieved messages from message box. If user did not delete these messages before visibility timeout, those messages will be available to retrieve for other users. If user tried to retrieved messages with low visibility timeout value, they will be retrieved and will be visible to retrieve again.

    Add Permissions on Message Box

    Message box can be shared with other users for five operations such as Send, Receive, Delete, ChangeVisibility and GetQueueAttributes. Those permissions allowed users can access queue for above operations. Permission label is defined for each allowed permission set. This label is used to delete allowed permissions.

    References