How to Use MQSeries for Publish/Subscribe

How to Use MQSeries for Publish/Subscribe thumbnail
MQSeries' publish/subscribe environment allows users to subscribe to and receive specific data that they select.

MQSeries is integration software designed for organizations that need to deliver data reliably, quickly and accurately. MQSeries has two methods of message delivery: "Request/Reply" and "Publish/Subscribe." In the Publish/Subscribe model, the publisher and subscriber applications are loosely coupled, meaning neither is aware of the other. The Publish/Subscribe model works using a "broker."

Instructions

    • 1

      Define a topic string that identifies the information being published by the MQSeries application. A topic string defines what information is contained in the message to be published. A sample topic string for a stock market application is:
      <Market>/<Sector>/<Company>

    • 2

      Define the topic string to be used by the subscribing application. The topic strings are case-sensitive but may be any length. The subscriber can use wild card characters to get published information. For example, "<New York>/<Banking>*" will return all stock market information from the New York Stock Exchange for all banks.

    • 3

      Configure your broker environment. Each MQSeries queue manager can function as a single broker. You can have multiple brokers set up in multiple locations. The number of brokers, or queue managers, needed will depend on the size of your company and the volume of work being processed. For example, if your company has headquarters in New York, a branch in Miami and another in Denver, you will need at least one broker in each city.

    • 4

      Set up the individual queues in each queue manager. The publishing application will write messages to a specific queue on the broker. The subscribing application reads from the specified queue. The two applications do not talk to each other, they talk to the broker. The messages being published can be broken down into streams defined by subject matter. The application publishing the information must know the exact name of the queue where it needs to place the message.

    • 5

      Define authority on the separate streams of information that the subscribing application can access. The authority is defined on the queue itself. A user with authority to a specific stream has access to all topics in that stream. The authority is defined by the broker's administrator. This level of authority is required only for larger broker networks. In our example broker network of New York, Miami and Denver, the permissions can be handled by topic only, having all messages written to one default queue.

Related Searches:

References

  • Photo Credit John Foxx/Stockbyte/Getty Images

Comments

Related Ads

Featured