Thursday, October 14, 2010

MQ -- Message Queuing

Creating a queue manager using the WebSphere MQ Explorer

1.Start the WebSphere® MQ Explorer from the Start menu.
2.In the Navigator View, expand the tree nodes to find the Queue Managers tree node.
3.Right-click the Queue Managers tree node, and select New->Queue Manager. The Create Queue Manager panel is displayed.
4.Complete the dialog (Step 1), then click Next>.
5.Complete the dialog (Step 2), then click Next>.
6.Complete the dialog (Step 3), ensuring that Start Queue Manager and Create Server Connection Channel are not selected, then click Next>.
7.Complete the dialog (Step 4), then click Finish.

Configuring WebSphere MQ with the WebSphere MQ Explorer
1.Before We use the WebSphere MQ applications, We must create a queue manager. The queue manager is a system program that is responsible for maintaining the queues and ensuring that the messages in the queues reach their destination. It also performs other functions associated with message queuing.

=>A queue is a named destination that applications use to PUT and GET messages. A queue name must be unique within a queue manager. Special queue types can be defined, such as transmission queues and dead letter queues.

=>A transmission queue is a queue that holds messages that will eventually be sent to a remote queue when a communication channel becomes available. Unless otherwise specified, these messages will be transmitted through the default transmission queue.

=>A dead letter queue is a local queue where messages that cannot be delivered are sent, either by the queue manager or an application. Some method should be in place in production environments to monitor and process messages in this queue.

1.From the WebSphere MQ Explorer window, expand the WebSphere MQ label, then right-click Queue Managers. Select New Queue Manager from the pop-up menu.

2.Enter the name for your queue manager. The name MYQMGR will be used in the following example. All names in WebSphere MQ are case sensitive. Using all capital letters for names helps avoid confusion. The names in the example are suggestions. You can use different names if you choose. Fill in names for the default transmission queue and dead letter queue. Check the box to make this your default queue manager.

Click Next to continue.
3.The next screen indicates the type of logging that the queue manager will perform, and the maximum number of log files that can be produced

Click Next to accept the suggested values and continue.
4.Verify that Start Queue Manager is checked.

Click Next to continue.

5.The following step enables the WebSphere MQ applications that are running on your machine to communicate with other machines. Make sure that Create listener configured for TCP/IP is selected, and enter 1414 for the port number. This is the default port number for WebSphere MQ. Check with your system administrator to verify that this is the correct port to use.

Click Finish to create your queue manager. It might take a minute to create and start the queue manager.

2.Create one or more local queues for exchanging messages on your queue manager. These are the queues that SAS applications will use to exchange messages with other applications. In the tree, find your newly created queue manager and click "+" to expand the menu. Right-click Queues, then select New Local Queue from the popup menu.

In the Queue Name field, enter the name of the local queue that you want to create. This queue name is specified in any application programs that use WebSphere MQ. On this screen, you might want to change the Default Persistence value from Not Persistent to Persistent. This enables messages to remain in the queue even if the queue manager is shut down. Click the various tabs to see the types of values that can be defined.


If you will be using high-volume messaging applications like scoring, you might want to change another default value. Click the Extended tab and increase the Maximum Queue Depth to 100,000 or more. This value represents the maximum number of messages that a queue can hold.


You can also change the properties after the queue has been defined. Click OK to create the queue. Repeat the process for any additional local queues that you want to create
Configuration Required for WebSphere MQ Client Access
IBM also provides a lighter client version of WebSphere MQ that can be installed and used separately from the full WebSphere MQ Base or server installation. The client can be installed on the same machine as the server, or on a separate machine. The client does not have its own queue manager, and must communicate over the network or within a machine to a queue manager that is defined elsewhere.

There are two requirements that must be completed before you can configure the client/server communication.

First, you must define a server connection channel on the queue manager that will provide support to the client. A channel is a definition that enables intercommunication between queue managers, or between clients and queue managers.

To define a server connection channel from the WebSphere MQ Explorer, click MYQMGR Advanced to expand the list. Right-click Channels, select NEW Server Connection Channel and enter the channel name (for example, SERVER.CHANNEL1).



MQ -- Messaging & Queuing

Message queuing is a method of program-to-program communication. Programs within an application communicate by
writing and retrieving application-specific data ( message) to/from queues, without having a private, dedicated, logical
connection to link them.

Messaging means that programs communicate with each other by sending data in messages and not by calling each other directly.

Queuing means that programs communicate through queues. Programs communicating through queues need not be executed concurrently.

Message Types

MQSeries knows four types of messages:
Datagram: A message containing information for which no response is expected.
Request: A message for which a reply is requested.
Reply: A reply to a request message.
Report: A message that describes an event such as the occurrence of an error or a confirmation on arrival or delivery.

No comments: