Creating IBM MQ listeners

The connector for IBM® MQ listener continually monitors a queue for messages. When a message is put into a queue, the listener fetches the message and passes it to the listener notification for further processing.

Before you begin

To create a listener for a project, you must have the IBM MQ connector that is created and enabled. For more information, see IBM MQ.

Procedure

  1. Go to the project in which you want to create a listener.
  2. Click Events > Listeners.
  3. Click New listener. The Add listener screen appears.
  4. Enter the required details in the Add listener screen.
    • In the Type of listener field, select IBM MQ from the list for which you want to create a listener.
    • In the Select version field, select the connector version.
  5. Enter the required details in the Listener page.
    • In the Listener name field, specify a name of the listener that listens for messages on a queue.
    • In the Connection name field, specify the connection to associate with the listener from the list of connections.
    • In the Retry limit field, specify a value the number of times the connector tries to reconnect when the connector fails to connect, or loses connection with the queue manager. The default value is 5.
    • In the Retry backoff timeout(ms) field, specify the number of seconds that elapse between each of the retries specified in the retry limit. The default value is 10.
  6. Select the Listener type in the Action page. IBM MQ supports single-queue listener type. Click Next.
  7. Enter the required details in the Configuration page.

    Configuration

    • Handle backout requeue- Select the queue to process undelivered messages of a listener service.
      • Select True to move the undelivered messages to the backout requeue, defined in the corresponding queue manager of the IBM MQ server.
      • Select False to move the undelivered messages to the dead letter queue. False is the default value.
    • Select Open queue in shared mode to choose how the queue is opened.
      • Select True in shared mode to allow simultaneous access to the queue by other applications.
      • Select False in exclusive mode to prevent simultaneous access to the queue by other applications.
    • Select Convert application data to choose how the action converts the message to the local character set and encoding.
      • Select True so that the messages that are read using the action are converted to the local character set and encoding. The default value is true.
        Note: If the property is True and the message format does not match the local character set and encoding, a warning message appears.
      • Select Falseso that the messages that are read using the action are converted to the local character set and encoding.
    • Select Retrieve only when all messages available to choose whether the action retrieves messages from a logical group.
      • Select True to retrieve multiple messages of one logical group.
      • Select False to retrieve all messages in the queue irrespective of any group. The default value is false.
    • Select Wait interval (msec), which is the time in milli-seconds that the listener waits for a message to appear on the queue before responding to a shutdown request from IBM MQ. Enter this value in milliseconds. The default value is 60000.

    Failover

    • Dead letter backout threshold- The number of times to retrieve the message before it is sent to the dead letter queue. For example, specify 1 to attempt to retrieve the message one time.
    • Dead letter queue name- The name of the queue that contains any messages that might not reach their destination. If you do not specify a value for this field, then IBM MQ connector does not move the message to a dead letter queue if the message might not reach its destination. If a message passes the filter criteria for the listener, but does not match the notification filter criteria will move the message to the dead letter queue after exceeding the backout threshold.
    • Dead letter queue manager name- The name of the queue manager for the dead letter queue.
    • Headers to include in dead letter message- Selects which headers to include in the message sent to the dead letter queue.
      • Select None to not include any headers along with the original payload in the message sent to the dead letter queue.
      • Select DLH to include only the DLH header along with the original payload in the message sent to the dead letter queue.
      • Select MQMD to include only the MQMD header along with the original payload in the message sent to the dead letter queue.
      • Select DLH_&_MQMD to include both DLH and MQMD headers along with the original payload in the message sent to the dead letter queue. DLH_&_MQMD is the default value.

    Click Next.

  8. Enter the required information in the Message filter page of the Add listener configuration screen.
    • Filter on message ID- The listener instructs IBM MQ to deliver only those messages that match the specified Message ID value within the MQMD Header of each message.
    • Click Next.
  9. Review the listener configuration details in the Overview page.
  10. Click Add Listener. The listener is saved and enabled.
  11. Click Done to complete and close the listener configurations without adding the Listener Notification. When you want to continue creating listener notification click Next. For more information on creating listener notification, see Adding IBM MQ listener notifications.