IBM MQ Producer

Overview

The IBM MQ Producer Snap sends messages to IBM MQ queues or topics. This Snap enables integration with IBM MQ messaging systems, supporting both point-to-point (queue) and publish-subscribe (topic) messaging patterns. Use this Snap to produce messages with configurable message options, MQMD properties, custom properties, and transaction control capabilities.


IBM MQ Producer Snap

Prerequisites

  • An IBM MQ Account with valid credentials and access permissions
  • Access to the target IBM MQ queue manager
  • Network connectivity between the Snaplex and IBM MQ server
  • Appropriate permissions to create dynamic queues (if using the Dynamic Queue feature)
Note: The Snap supports publishing to queues and topics, setting MQMD properties on outgoing messages, defining custom dynamic properties, and controlling put behavior through IBM MQ Put Message Options.

Snap views

Type Description Examples of upstream and downstream Snaps
Input

Accepts documents from upstream Snaps. Each input document is processed and sent as a message to the specified IBM MQ destination.

  • Mapper
  • Structure
  • JSON Generator
Output

Outputs a document for each successfully sent message containing message metadata including message ID and correlation ID.

  • Filter
  • Mapper
  • JSON Formatter
Learn more about Error handling.

Snap settings

Legend:
  • Expression icon (): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field/Field set Type Description

Label

String

String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: IBM MQ Producer

Destination String/Expression

Required. The name of the IBM MQ queue or topic to which messages will be sent.

Example: TestQueue

Destination type Dropdown list

Specify the type of destination to which messages are sent:

  • Queue - Point-to-point message is published to one queue
  • Topic - Publish-subscribe messaging where messages are published to multiple subscribers

Default value: Queue

Dynamic queue Checkbox

When enabled, it creates a dynamic queue if it does not already exist. Dynamic queues based on a model queue (the model queue can be permanent or temporary).

Default value: Deselected

Model queue name String/Expression

Specify the name of the model queue to use as a template for creating the dynamic queue. The model queue defines the attributes (such as maximum depth, message persistence, and access permissions). The model queue must be created or present in MQ. This field appears only when the Dynamic queue is enabled.

Example: SYSTEM.DEFAULT.MODEL.QUEUE

Message persistence Dropdown list

Specify the persistence mode for messages:

  • As Queue Definition - Uses the persistence setting defined in the queue's configuration (MQPER_PERSISTENCE_AS_Q_DEF)
  • Persistent - Messages are stored in persistent mode (MQPER_PERSISTENT)
  • Not Persistent - Messages are stored are stored in non-persistent mode (MQPER_NOT_PERSISTENT)

Default value: As Queue Definition

MQMD Properties
Property name Integer/Expression

Specify the MQMD property name.

Example: abc

Property value Integer/String/Expression

Specify report options for the message. Accepts integer values or IBM MQ constant names.

Example: MQRO_EXCEPTION (reports exception messages)

MsgType Integer/Expression

Specify the message type indicator.

Example: 8 (for request messages)

Expiry Integer/Expression

Specify the message expiration time in tenths of a second. A value of -1 indicates no expiration.

Example: 600 (message expires after 60 seconds)

Feedback Integer/Expression

Specify the feedback code for report messages.

Encoding Integer/Expression

Specify the numeric encoding used for numeric data in the message.

Example: 273 (for big-endian integer encoding)

Custom Properties
Custom Properties Table

Specify custom properties as key-value pairs that are stored in the RFH2 (Rules and Formatting Header version 2) usr folder. These values are present in XML format in the <usr></usr> folder of RFH2.

Put Message Options (PMO)
Context control Dropdown list

Controls the message context (identity and origin information) that is set when the message is put on the queue:

  • Default - No special context is set
  • Set Identity Context - Sets identity context including UserIdentifier (MQPMO_SET_IDENTITY_CONTEXT)
  • Set All Context - Sets all context fields including identity and origin information such as PutDate and PutTime (MQPMO_SET_ALL_CONTEXT)
Note: Setting PutDate or PutTime in MQMD Properties requires Context Control to be set to Set All Context.

Default value: Set All Context

Syncpoint control Dropdown list

Enables transaction coordination for put operations:

  • Syncpoint - Messages are sent within a transactional unit of work. The transaction is committed when batch size is reached (MQPMO_SYNCPOINT)
  • No Syncpoint - Messages are sent immediately without transactional control
Note: When Syncpoint is selected, you must use the IBM MQ Acknowledge Snap downstream to commit or rollback the transaction.

Default value: No Syncpoint

Batch size Integer/Expression

Specify the number of messages to send per batch. This setting is particularly relevant when Syncpoint Control is enabled, as it determines how many messages are included in a single transactional unit of work.

Note: When Syncpoint Control is enabled and an error record occurs within a batch, all messages in that batch from the failed record is rolled back. The next record then begins a new batch.

Default value: 1

Example: 100 (sends 100 messages per transaction)

Number of retries Integer

Specify the number of retry attempts for connection or network errors. When set to 0, the Snap does not retry on failure.

Default value: 0

Retry Interval (milliseconds) Integer

Specify the wait time in milliseconds between retry attempts.

Default value: 1000

Example: 5000 (waits 5 seconds between retries)

Snap execution Dropdown list Choose one of the three modes in which the Snap executes.
Available options are:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.

Troubleshooting

Error Resolution
MQRC_NOT_AUTHORIZED (2035) Verify that the IBM MQ Account has appropriate permissions to put messages on the queue or topic. Check the queue manager's authority records.
MQRC_UNKNOWN_OBJECT_NAME (2085) Confirm that the queue or topic name is correct and exists on the queue manager. If using Dynamic Queue, verify the model queue name is correct.
MQRC_Q_FULL (2053) The queue has reached its maximum depth and cannot accept more messages. Remove messages from the queue or increase the queue's maximum depth setting.
MQRC_CONNECTION_BROKEN (2009) Check network connectivity between the Snaplex and IBM MQ server. Verify firewall rules allow traffic on the specified port.
MQRC_PUT_INHIBITED (2051) The queue is configured to inhibit put operations. Change the queue's put setting to enabled or use a different queue.
MQRC_OPTION_NOT_VALID_FOR_TYPE (2046) The specified put options are not valid for the destination type. For example, setting PutDate/PutTime requires Context Control to be set to Set All Context.
Invalid MQMD property value Verify that MQMD property values are within valid ranges. For example, Priority must be between 0 and 9, and Expiry must be a non-negative integer.