Skip to content

ibm_mq

Pushes messages to IBM MQ queues.

# Common config fields, showing default values
output:
label: ""
ibm_mq:
queue_manager_name: QM1 # No default (required)
queue_name: ""
channel_name: DEV.APP.SVRCONN # No default (required)
connection_name: localhost(1414) # No default (required)
user_id: ""
password: ""

Pushes messages to IBM MQ queues.

Uses IBM MQ output component found in wombatwisdom/components.

Build Requirements

This component requires IBM MQ client libraries. Build with the mqclient build tag:

Terminal window
go build -tags mqclient

Example: Basic configuration

output:
ibm_mq:
queue_manager_name: QM1
queue_name: DEV.QUEUE.1
channel_name: DEV.APP.SVRCONN
connection_name: localhost(1414)

Example: With dynamic queue routing

output:
ibm_mq:
queue_manager_name: QM1
queue_name: 'DEV.QUEUE.${! json("queue_num") }'
channel_name: DEV.APP.SVRCONN
connection_name: localhost(1414)

Example: With TLS/SSL

output:
ibm_mq:
queue_manager_name: QM1
queue_name: DEV.QUEUE.1
channel_name: DEV.APP.SVRCONN
connection_name: secure-mq.example.com(1414)
tls:
enabled: true
cipher_spec: TLS_RSA_WITH_AES_256_CBC_SHA256
key_repository: /opt/mqm/ssl/key

Example: With metadata filtering

Filter which metadata fields are sent as message properties to IBM MQ. Use patterns with wildcards to match field names.

output:
ibm_mq:
queue_manager_name: QM1
queue_name: DEV.QUEUE.1
channel_name: DEV.APP.SVRCONN
connection_name: localhost(1414)
metadata:
patterns:
- "app_*" # Include all fields starting with 'app_'
- "user_id" # Include the 'user_id' field
- "request_*" # Include all fields starting with 'request_'
invert: false # Include only matching patterns (set to true to exclude them instead)

In this example, only metadata fields matching the patterns will be sent to IBM MQ. For instance:

  • app_version: 1.0.0 → Included (matches app_*)
  • user_id: john.doe → Included (exact match)
  • internal_trace_id: xyz → Excluded (doesn’t match any pattern)

Set invert: true to reverse the logic and exclude matching patterns instead.

Fields

queue_manager_name

The queue manager name to connect to

Type: string

# Examples
queue_manager_name: QM1

queue_name

The queue name to write messages to This field supports interpolation functions.

Type: string

Default: ""

# Examples
queue_name: DEV.QUEUE.1
queue_name: ${! meta("target_queue") }

channel_name

The channel name for client connections

Type: string

# Examples
channel_name: DEV.APP.SVRCONN

connection_name

The connection name in the format hostname(port)

Type: string

# Examples
connection_name: localhost(1414)

user_id

Optional: The user ID for authentication

Type: string

Default: ""

password

Optional: The user password for authentication

Type: string

Default: ""

application_name

Optional: Application name for MQ connection identification

Type: string

Default: "wombat"

format

The format of the message data (e.g., ‘MQSTR’ for string, ‘MQHRF2’ for RFH2 headers)

Type: string

Default: "MQSTR"

ccsid

The Coded Character Set Identifier for the message. Common values: ‘1208’ (UTF-8), ‘819’ (ISO-8859-1)

Type: string

Default: "1208"

encoding

The encoding of numeric data in the message. Common values: ‘546’ (Linux/Windows little-endian), ‘273’ (big-endian)

Type: string

Default: "546"

metadata

Metadata configuration for filtering message headers

Type: object

metadata.patterns

Patterns to match metadata fields

Type: array

Default: []

metadata.invert

If true, exclude matching patterns; if false, include only matching patterns

Type: bool

Default: false

tls

TLS/SSL configuration for secure connections

Type: object

tls.enabled

Enable TLS encryption for the connection

Type: bool

Default: false

tls.cipher_spec

The cipher specification to use for TLS

Type: string

Default: ""

# Examples
cipher_spec: TLS_RSA_WITH_AES_256_CBC_SHA256

tls.key_repository

Path to the key repository containing certificates (without file extension)

Type: string

Default: ""

# Examples
key_repository: /opt/mqm/ssl/key

tls.key_repository_password

Password for the key repository

Type: string

Default: ""

tls.certificate_label

Certificate label to use from the key repository

Type: string

Default: ""

tls.ssl_peer_name

Peer name for SSL/TLS validation

Type: string

Default: ""

tls.fips_required

Require FIPS 140-2 compliant algorithms

Type: bool

Default: false