Receiving a Message from a WebSphere MQ Queue

Sybase WorkSpace enables you to receive a message from a specified endpoint in an WebSphere MQ queue. This message can be defined in a stored procedure or trigger.

Prerequisites 

To receive a message from a WebSphere MQ queue, you must have IBM WebSphere MQ running and an open Adaptive Server Enterprise connection profile with Real-Time Messaging configured. A message receiver/queue must be available in the WebSphere MQ server to serve as the endpoint, or destination, for the received message.

  1. For the appropriate ASE connection profile and database, select the appropriate procedural object.
    Object How to select
    Stored procedure Expand the Stored Procedures folder, right-click the stored procedure, and select Edit.
    Trigger Expand the Tables folder, expand the table, and then expand the Triggers folder. Right-click the trigger and select Edit.
  2. In the Source page, place the cursor in the desired location within the SQL code, right-click and select Sybase_ASE_15.x > Real-Time Messaging Wizard .

    You can also open the wizard from theReal-Time Messaging Wizard icon ASE Real-Time Messaging Wizard icon on the toolbar.

  3. Select Queue-Related Functions (MQSeries) > Receive a Message , and click Next.
  4. Specify an ASE JMS provider name, and provide endpoint information.
    Field Description
    Host Name Endpoint host name
    Port Endpoint port number
    Queue Manager Endpoint queue manager
    Remote Queue Manager Remote queue manager
    Client Channel Endpoint client channel
    Queue Endpoint queue
  5. Click Next to specify message options.
  6. Enter the message options.
    Tab Description
    Options Choose a message type and enter a value in the Values field.
    Return Datatype Choose a return datatype.
  7. Click Finish.
    Note: Because ASE messaging constructs are functions, select appears before the messaging construct. You can also assign the messaging function to a local variable that has already been declared.
Related concepts
Real-Time Messaging Services
Mapping Functions
Related tasks
Sending a Message to a JMS Queue
Receiving a Message from a JMS Queue
Sending a Message to a WebSphere MQ Queue
Publishing a Message to a Topic
Subscribing to a Topic
Consuming a Message from a Topic
Unsubscribing from a Topic
Registering a Subscription
Parsing an XML Document
Retrieving XML Message Properties
Related reference
Select for XML Statements


Created June 25, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com