IBM MQ Source Connector for Confluent Cloud

The fully-managed IBM MQ Source connector for Confluent Cloud reads messages from an IBM MQ cluster and then writes them to an Apache Kafka® topic.

Note

Features

The IBM MQ Source connector provides the following features:

  • This connector guarantees that records are delivered at-least-once to the Kafka topic.

  • Client-side encryption (CSFLE and CSPE) support: The connector supports CSFLE and CSPE for sensitive data. For more information about CSFLE or CSPE setup, see the connector configuration.

  • Multiple tasks: The connector supports multiple tasks. More tasks may improve performance.

  • JMS message types: The connector supports TextMessage and BytesMessage. It does not support ObjectMessage or StreamMesssage.

  • Supports exactly once semantics (EOS): The connector supports exactly once semantics. For more information, see Exactly once semantics.

For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect Usage Examples section.

Limitations

Be sure to review the following information.

Errors and retry attempts

The IBM MQ Source connector uses the general retry policy implemented for most Kafka Connect connectors. Additionally, the IBM MQ Source connector uses exponential backoff after each retry attempt. The backoff time is the time between retries and a random value between zero and the exponentially increasing bound. The exponential bound is capped at one minute and the initial backoff time is set to 100 milliseconds (ms).

initialbackoffTime * 2 ^ (retry-1)

The following errors will trigger a retry. With the exception of MQRC_GET_INHIBITED, all of the listed errors first shut down the connection and then reconnect before retrying.

  • MQRC_GET_INHIBITED

  • MQRC_BACKED_OUT

  • MQRC_CHANNEL_NOT_AVAILABLE

  • MQRC_CONNECTION_BROKEN

  • MQRC_HOST_NOT_AVAILABLE

  • MQRC_NOT_AUTHORIZED

  • MQRC_Q_MGR_NOT_AVAILABLE

  • MQRC_Q_MGR_QUIESCING

  • MQRC_Q_MGR_STOPPING

  • MQRC_UNEXPECTED_ERROR

Exactly once semantics

Note

Exactly once semantics (EOS) is an Early Access Program feature in Confluent Cloud.

An Early Access feature is a component of Confluent Cloud introduced to gain feedback. This feature should be used only for evaluation and non-production testing purposes or to provide feedback to Confluent, particularly as it becomes more widely available in follow-on preview editions.

Early Access Program features are intended for evaluation use in development and testing environments only, and not for production use. Early Access Program features are provided: (a) without support; (b) “AS IS”; and (c) without indemnification, warranty, or condition of any kind. No service level commitment will apply to Early Access Program features. Early Access Program features are considered to be a Proof of Concept as defined in the Confluent Cloud Terms of Service. Confluent may discontinue providing preview releases of the Early Access Program features at any time in Confluent’s sole discretion.

The connector processes each record exactly once, even through failures or restarts. It uses the state topic to track progress of the records it has processed, allowing it to resume from the last processed record in case of a failure.

Consider the following limitations while using exactly once semantics for a connector:

  • Exactly once semantics is only supported for new connectors. You cannot change an existing connector’s delivery guarantee to or from exactly once semantics.

  • Offset storage topics are stored in your Kafka cluster. Deleting this topic or modifying its settings may affect the connector’s functionality.

  • The messages processed metric reflects the total messages handled by the connector, not the final count written to Kafka with EOS. This metric may therefore show a higher record count than expected.

Note

When enabling exactly once semantics (EOS), the service account requires the addtional permissions. For more information, see Exactly once semantics for source connectors.

Quick Start

Use this quick start to get up and running with the Confluent Cloud IBM MQ source connector. The quick start shows how to attach the connector to an IBM MQ broker, subscribe to the specified queue or topic, and stream data into Apache Kafka®.

Prerequisites
  • Kafka cluster credentials. The following lists the different ways you can provide credentials.

    • Enter an existing service account resource ID.

    • Create a Confluent Cloud service account for the connector. Make sure to review the ACL entries required in the service account documentation. Some connectors have specific ACL requirements.

    • Create a Confluent Cloud API key and secret. To create a key and secret, you can use confluent api-key create or you can autogenerate the API key and secret directly in the Cloud Console when setting up the connector.

Using the Confluent Cloud Console

Step 1: Launch your Confluent Cloud cluster

To create and launch a Kafka cluster in Confluent Cloud, see Create a kafka cluster in Confluent Cloud.

Step 2: Add a connector

In the left navigation menu, click Connectors. If you already have connectors in your cluster, click + Add connector.

Step 3: Select your connector

Click the IBM MQ Source connector card.

IBM MQ Source Connector Card

Step 4: Enter the connector details

Note

  • Make sure you have all your prerequisites completed.

  • An asterisk ( * ) designates a required entry.

At the Add IBM MQ Source Connector screen, complete the following:

Select the topic you want to send data to from the Topics list. To create a new topic, click +Add new topic.

  1. Select the way you want to provide Kafka Cluster credentials. You can choose one of the following options:

    • My account: This setting allows your connector to globally access everything that you have access to. With a user account, the connector uses an API key and secret to access the Kafka cluster. This option is not recommended for production.

    • Service account: This setting limits the access for your connector by using a service account. This option is recommended for production.

    • Use an existing API key: This setting allows you to specify an API key and a secret pair. You can use an existing pair or create a new one. This method is not recommended for production environments.

    Note

    Freight clusters support only service accounts for Kafka authentication.

  2. Click Continue.

  1. Configure the authentication properties:

    IBM MQ Connection

    • Username: The username to use when connecting to IBM MQ.

    • Password: The password to use when connecting to IBM MQ.

    • MQ configuration mode: The mode in connector is to configure single mq instance or multiple for HA/DR support

    • IBM MQ broker host: The IBM MQ broker host.

    • IBM MQ broker port: The IBM MQ broker port.

    • IBM MQ connection list: For IBM’s HA/DR support with multiple MQ instances, enter hosts as comma-separated values (for example, host1:port1, host2:port2). Configure the connector with a reasonable value for max.retry.time to ensure it has sufficient time to switch over to another instance before failing.

    IBM MQ Secure Connection

    • TLS Keystore Type: The file format of the key store file. This is required only when using secure TLS communication with IBM MQ.

    • TLS Keystore file: Upload your TLS key store file.

    • TLS Keystore Password: The store password for the key store file. This is optional for client and only needed if TLS Keystore file is configured.

    • TLS Key Password: The password of the private key used for secure TLS communication with IBM MQ.

    • TLS Truststore Type: The file format of the trust store file. This is required when using TLS and secure communication with IBM MQ.

    • TLS Truststore file: Upload your TLS trust store file.

    • TLS Truststore Password: The password for the trust store file. If a password is not set access to the truststore is still available, but integrity checking is disabled. This is required only when using secure TLS communication with IBM MQ.

    • TLS KeyManager Algorithm: The algorithm used by key manager factory for SSL connections. Default value is the key manager factory algorithm configured for the Java Virtual Machine. This is required only when using secure TLS communication with IBM MQ.

    • TLS TrustManager Algorithm: The algorithm used by trust manager factory for SSL connections. Default value is the trust manager factory algorithm configured for the Java Virtual Machine. This is required only when using secure TLS communication with IBM MQ.

    • TLS Secure Random Implementation: The SecureRandom PNG implementation to use for SSL cryptography operations.

  2. Click Continue.

Output messages

  • Select output record value format: Select the output record value format (data going to the Kafka topic). Valid options are AVRO, JSON, JSON_SR (JSON Schema), or PROTOBUF. Confluent Cloud Schema Registry must be enabled to use a Schema Registry-based format (for example, Avro, JSON Schema, or Protobuf). For additional information, see Schema Registry Enabled Environments.

IBM MQ Session

  • Destination Name: The name of the JMS destination (queue or topic) to read from.

  • Destination Type: The type of JMS destination, which is either queue or topic.

IBM MQ Connection

Data encryption

  • Enable Client-Side Field Level Encryption for data encryption. Specify a Service Account to access the Schema Registry and associated encryption rules or keys with that schema. For more information on CSFLE or CSPE setup, see Manage encryption for connectors.

Show advanced configurations
  • Schema context: Select a schema context to use for this connector, if using a schema-based data format. This property defaults to the Default context, which configures the connector to use the default schema set up for Schema Registry in your Confluent Cloud environment. A schema context allows you to use separate schemas (like schema sub-registries) tied to topics in different Kafka clusters that share the same Schema Registry environment. For example, if you select a non-default context, a Source connector uses only that schema context to register a schema and a Sink connector uses only that schema context to read from. For more information about setting up a schema context, see What are schema contexts and when should you use them?.

Additional Configs

  • Value Converter Replace Null With Default: Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used. Applicable for JSON Converter.

  • Value Converter Reference Subject Name Strategy: Set the subject reference name strategy for value. Valid entries are DefaultReferenceSubjectNameStrategy or QualifiedReferenceSubjectNameStrategy. Note that the subject reference name strategy can be selected only for PROTOBUF format with the default strategy being DefaultReferenceSubjectNameStrategy.

  • Value Converter Schemas Enable: Include schemas within each of the serialized values. Input messages must contain schema and payload fields and may not contain additional fields. For plain JSON data, set this to false. Applicable for JSON Converter.

  • Errors Tolerance: Use this property if you would like to configure the connector’s error handling behavior. WARNING: This property should be used with CAUTION for SOURCE CONNECTORS as it may lead to dataloss. If you set this property to ‘all’, the connector will not fail on errant records, but will instead log them (and send to DLQ for Sink Connectors) and continue processing. If you set this property to ‘none’, the connector task will fail on errant records.

  • Value Converter Ignore Default For Nullables: When set to true, this property ensures that the corresponding record in Kafka is NULL, instead of showing the default column value. Applicable for AVRO,PROTOBUF and JSON_SR Converters.

  • Value Converter Decimal Format: Specify the JSON/JSON_SR serialization format for Connect DECIMAL logical type values with two allowed literals: BASE64 to serialize DECIMAL logical types as base64 encoded binary data and NUMERIC to serialize Connect DECIMAL logical type values in JSON/JSON_SR as a number representing the decimal value.

  • Key Converter Schema ID Serializer: The class name of the schema ID serializer for keys. This is used to serialize schema IDs in the message headers.

  • Value Converter Connect Meta Data: Allow the Connect converter to add its metadata to the output schema. Applicable for Avro Converters.

  • Value Converter Value Subject Name Strategy: Determines how to construct the subject name under which the value schema is registered with Schema Registry.

  • Key Converter Key Subject Name Strategy: How to construct the subject name for key schema registration.

  • Value Converter Schema ID Serializer: The class name of the schema ID serializer for values. This is used to serialize schema IDs in the message headers.

Auto-restart policy

  • Enable Connector Auto-restart: Control the auto-restart behavior of the connector and its task in the event of user-actionable errors. Defaults to true, enabling the connector to automatically restart in case of user-actionable errors. Set this property to false to disable auto-restart for failed connectors. In such cases, you would need to manually restart the connector.

Exactly Once Semantics

  • Exactly Once Enabled: If set to true, enables exactly-once support for this connector. This ensures that each record reaches the destination exactly once.

  • Offset Storage Topic: The topic name used as offset storage topic to store the connector’s offsets. Defaults to connect-offsets-${connector}. Within the value, ${connector} can be used as a placeholder for the logical cluster ID. The designated topic should not pre-exist.

  • State Topic Name: The name of the IBM MQ topic used to guarantee exactly-once message delivery. The connector stores and uses offset data in this topic to ensure delivery across restarts. This topic must be created in IBM MQ before the connector is created, as it will not be auto-created. Since the connector uses a durable subscriber to consume from this topic, it should not be shared with any other connector or consumer.

IBM MQ Session

  • Max pending messages: The maximum number of messages per task that can be received from JMS brokers and produced to Kafka before the task acknowledges the JMS session/messages. If the task fails and is restarted, this is the maximum number of JMS messages the task may duplicate in Kafka.

  • Maximum time to wait for a single poll in milliseconds.: The maximum amount of time each task can build a batch. The batch is closed and sent to Kafka if not enough messages are read during the time allotted. This helps limit connector lag when the JMS queue/topic has a lower throughput.

  • Character Encoding: The character encoding to use while receiving the message. Defaults to UTF-8.

  • Durable Subscription: Whether the connector task subscription to the JMS topic is durable or not.

  • Subscription Name: The name of the JMS subscription. Supported only in durable subscriptions (jms.subscription.durable = true) and is applicable only to JMS topics.

  • Message Selector: The JMS message selector that should be applied to messages in the destination.

  • Initial Poll Wait Time (ms): The initial amount of time in milliseconds to wait when polling for new messages before switching to a shorter poll interval. This helps reduce the number of empty poll attempts during startup or when the queue is empty.

IBM MQ Connection

  • SSL Cipher Suite: The CipherSuite for SSL connections.

  • SSL FIPS Required: Set whether SSL FIPS is required.

  • SSL Peer Name: Sets a distinguished name (DN) pattern. If sslCipherSuite is set, this pattern can ensure that the correct queue manager is used. The connection attempt fails if the distinguished name provided by the queue manager does not match this pattern.

IBM MQ Secure Connection

  • TLS Protocol: The TLS protocol version for secure connections to IBM MQ.

Transforms

See Configuration Properties for all property values and definitions.

  • Click Continue.

Based on the number of topic partitions you select, you will be provided with a recommended number of tasks.

  1. To change the number of tasks, use the Range Slider to select the desired number of tasks.

  2. Click Continue.

  1. Verify the connection details by previewing the running configuration.

    Tip

    For information about previewing your connector output, see Data Previews for Confluent Cloud Connectors.

  2. Once you’ve validated that the properties are configured to your satisfaction, click Launch.

    The status for the connector should go from Provisioning to Running.

Step 5: Check the Kafka topic

After the connector is running, verify that messages are populating your Kafka topic.

For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect Usage Examples section.

Using the Confluent CLI

Complete the following steps to set up and run the connector using the Confluent CLI.

Note

Make sure you have all your prerequisites completed.

Step 1: List the available connectors

Enter the following command to list available connectors:

confluent connect plugin list

Step 2: List the connector configuration properties

Enter the following command to show the connector configuration properties:

confluent connect plugin describe <connector-plugin-name>

The command output shows the required and optional configuration properties.

Step 3: Create the connector configuration file

Create a JSON file that contains the connector configuration properties. The following example shows the required connector properties.

{
  "connector.class": " IbmMQSource",
  "name": "IbmMQSource",
  "kafka.auth.mode": "KAFKA_API_KEY",
  "kafka.api.key": "<my-kafka-api-key>",
  "kafka.api.secret": "<my-kafka-api-secret>",
  "kafka.topic" : "data_topic_0",
  "output.data.format": "AVRO",
  "jms.destination.name": "<destination-name>",
  "mq.username": "<authorized-user>",
  "mq.password": "<user-password>"
  "mq.hostname": "<server-hostname>",
  "mq.queue.manager": <queue-name>",
  "tasks.max" : "1"
}

Note the following property definitions:

  • "name": Sets a name for your new connector.

  • "connector.class": Identifies the connector plugin name.

  • "kafka.auth.mode": Identifies the connector authentication mode you want to use. There are two options: SERVICE_ACCOUNT or KAFKA_API_KEY (the default). To use an API key and secret, specify the configuration properties kafka.api.key and kafka.api.secret, as shown in the example configuration (above). To use a service account, specify the Resource ID in the property kafka.service.account.id=<service-account-resource-ID>. To list the available service account resource IDs, use the following command:

    confluent iam service-account list
    

    For example:

    confluent iam service-account list
    
       Id     | Resource ID |       Name        |    Description
    +---------+-------------+-------------------+-------------------
       123456 | sa-l1r23m   | sa-1              | Service account 1
       789101 | sa-l4d56p   | sa-2              | Service account 2
    
  • "kafka.topic": The Kafka topic name where you want data sent.

  • "output.data.format": Supports AVRO, JSON, JSON_SR, and PROTOBUF. Schema Registry must be enabled to use a Schema Registry-based format.

  • "jms.destination.name": This is the name of the JMS destination (queue or topic) to read from.

  • "mq.username": Authorized user for the broker host. mq.password is required if not using additional connection security.

  • "mq.queue.manager": The IBM MQ queue manager.

  • "tasks.max": Enter the number of tasks in use by the connector. The connector supports multiple tasks. More tasks may improve performance.

Note

To enable CSFLE or CSPE for data encryption, specify the following properties:

  • csfle.enabled: Flag to indicate whether the connector honors CSFLE or CSPE rules.

  • sr.service.account.id: A Service Account to access the Schema Registry and associated encryption rules or keys with that schema.

For more information on CSFLE or CSPE setup, see Manage encryption for connectors.

Single Message Transforms: See the Single Message Transforms (SMT) documentation for details about adding SMTs. See Unsupported transformations for a list of SMTs that are not supported with this connector.

See Configuration Properties for all property values and definitions.

Step 4: Load the properties file and create the connector

Enter the following command to load the configuration and start the connector:

confluent connect cluster create --config-file <file-name>.json

For example:

confluent connect cluster create --config-file ibmmq-source.json

Example output:

Created connector  IbmMQSource_0 lcc-ix4dl

Step 5: Check the connector status

Enter the following command to check the connector status:

confluent connect plugin list

Example output:

ID          |    Name           | Status  |  Type
+-----------+-------------------+---------+-------+
lcc-ix4dl   |  IbmMQSource_0    | RUNNING | source

Step 6: Check the results on the broker.

After the connector is running, verify that messages are populating your Kafka topic.

For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect Usage Examples section.

Configuration Properties

Use the following configuration properties with the fully-managed connector. For self-managed connector property definitions and other details, see the connector docs in Self-managed connectors for Confluent Platform.

How should we connect to your data?

name

Sets a name for your connector.

  • Type: string

  • Valid Values: A string at most 64 characters long

  • Importance: high

Kafka Cluster credentials

kafka.auth.mode

Kafka Authentication mode. It can be one of KAFKA_API_KEY or SERVICE_ACCOUNT. It defaults to KAFKA_API_KEY mode, whenever possible.

  • Type: string

  • Valid Values: SERVICE_ACCOUNT, KAFKA_API_KEY

  • Importance: high

kafka.api.key

Kafka API Key. Required when kafka.auth.mode==KAFKA_API_KEY.

  • Type: password

  • Importance: high

kafka.service.account.id

The Service Account that will be used to generate the API keys to communicate with Kafka Cluster.

  • Type: string

  • Importance: high

kafka.api.secret

Secret associated with Kafka API key. Required when kafka.auth.mode==KAFKA_API_KEY.

  • Type: password

  • Importance: high

Which topic do you want to send data to?

kafka.topic

Identifies the topic name to write the data to.

  • Type: string

  • Importance: high

Exactly Once Semantics

exactly.once.enabled

When set to true, enables exactly-once support for this connector, ensuring each record reaches the destination exactly once.

  • Type: boolean

  • Default: false

  • Importance: high

offsets.storage.topic

The topic name used as offset storage topic to store the connector’s offsets. Defaults to connect-offsets-${connector}. Within the value, ${connector} can be used as a placeholder for the logical cluster ID. The designated topic should not pre-exist.

  • Type: string

  • Importance: medium

state.topic.name

The name of the IBM MQ topic used to guarantee exactly-once message delivery. The connector stores and uses offset data in this topic to ensure delivery across restarts. This topic must be created in IBM MQ before the connector is created, as it will not be auto-created. Since the connector uses a durable subscriber to consume from this topic, it should not be shared with any other connector or consumer.

  • Type: string

  • Importance: medium

Schema Config

schema.context.name

Add a schema context name. A schema context represents an independent scope in Schema Registry. It is a separate sub-schema tied to topics in different Kafka clusters that share the same Schema Registry instance. If not used, the connector uses the default schema configured for Schema Registry in your Confluent Cloud environment.

  • Type: string

  • Default: default

  • Importance: medium

Output messages

output.data.format

Sets the output Kafka record value format. Valid entries are AVRO, JSON_SR, PROTOBUF, or JSON. Note that you need to have Confluent Cloud Schema Registry configured if using a schema-based message format like AVRO, JSON_SR, and PROTOBUF

  • Type: string

  • Default: JSON

  • Importance: high

IBM MQ Secure Connection

mq.tls.protocol

The TLS protocol version for secure connections to IBM MQ. The default is TLSv1.2, which should be fine for most cases, though the actual set of allowed values will depend on the JVM. Recent JVMs support TLSv1.3 and TLSv1.2, TLSv1.1 and TLS. Older JVMs may support SSL, SSLv2 and SSLv3, but these versions are disabled due to known security vulnerabilities.

  • Type: string

  • Default: TLSv1.2

  • Importance: medium

mq.tls.keystore.type

The file format of the key store file. This is required only when using secure TLS communication with IBM MQ. For MQ on Cloud queue managers of version 9.2.1 revision 2 and above, TLS is enabled by default

  • Type: string

  • Default: JKS

  • Importance: medium

mq.tls.keystore.location

The key store file. This is required only when using secure TLS communication with IBM MQ.

  • Type: password

  • Importance: high

mq.tls.keystore.password

The store password for the key store file. This is optional for client and only needed if TLS Keystore file is configured.

  • Type: password

  • Importance: high

mq.tls.key.password

The password of the private key used for secure TLS communication with IBM MQ.

  • Type: password

  • Importance: high

mq.tls.truststore.type

The file format of the trust store file. This is required when using TLS and secure communication with IBM MQ.

  • Type: string

  • Default: JKS

  • Importance: medium

mq.tls.truststore.location

The trust store file. This is required only when using secure TLS communication with IBM MQ.

  • Type: password

  • Importance: high

mq.tls.truststore.password

The password for the trust store file. If a password is not set access to the truststore is still available, but integrity checking is disabled. This is required only when using secure TLS communication with IBM MQ.

  • Type: password

  • Importance: high

mq.tls.keymanager.algorithm

The algorithm used by key manager factory for SSL connections. Default value is the key manager factory algorithm configured for the Java Virtual Machine. This is required only when using secure TLS communication with IBM MQ.

  • Type: string

  • Default: SunX509

  • Importance: low

mq.tls.trustmanager.algorithm

The algorithm used by trust manager factory for SSL connections. Default value is the trust manager factory algorithm configured for the Java Virtual Machine. This is required only when using secure TLS communication with IBM MQ.

  • Type: string

  • Default: PKIX

  • Importance: low

mq.tls.secure.random.implementation

The SecureRandom PRNG implementation to use for SSL cryptography operations. By default, tries PKCS11 implementation first. If PKCS11 is not supported, iterates through the provider and returns the first working implementation. This is required only when using secure TLS communication with IBM MQ.

  • Type: string

  • Importance: low

IBM MQ Session

jms.destination.name

The name of the JMS destination (queue or topic) to read from.

  • Type: string

  • Importance: high

jms.destination.type

The type of JMS destination, which is either queue or topic.

  • Type: string

  • Default: queue

  • Importance: high

max.pending.messages

The maximum number of messages per task that can be received from JMS brokers and produced to Kafka before the task acknowledges the JMS session/messages. If the task fails and is restarted, this is the maximum number of JMS messages the task may duplicate in Kafka.

  • Type: int

  • Default: 2000

  • Valid Values: [0,…,20000]

  • Importance: high

max.poll.duration

The maximum amount of time each task can build a batch. The batch is closed and sent to Kafka if not enough messages are read during the time allotted. This helps limit connector lag when the JMS queue/topic has a lower throughput.

  • Type: int

  • Importance: low

character.encoding

The character encoding to use while receiving the message.

  • Type: string

  • Default: UTF-8

  • Importance: low

jms.subscription.durable

Whether the subscription of the connector tasks to a JMS topic is durable or not. Durable subscriptions require a subscription name to be set via jms.subscription.name.

  • Type: boolean

  • Importance: medium

jms.subscription.name

The name of the JMS subscription. Supported only in durable subscriptions (jms.subscription.durable = true) and is applicable only to JMS topics.

  • Type: string

  • Importance: medium

jms.message.selector

The JMS message selector that should be applied to messages in the destination.

  • Type: string

  • Importance: high

initial.poll.wait.time.ms

The initial amount of time in milliseconds to wait when polling for new messages before switching to a shorter poll interval. This helps reduce the number of empty poll attempts during startup or when the queue is empty.

  • Type: int

  • Default: 5000 (5 seconds)

  • Importance: low

IBM MQ Connection

mq.username

The username to use when connecting to IBM MQ.

  • Type: string

  • Importance: high

mq.password

The password to use when connecting to IBM MQ.

  • Type: password

  • Importance: high

mq.configuration.mode

The mode in connector is to configure single mq instance or multiple for HA/DR support

  • Type: string

  • Default: single

  • Importance: high

mq.hostname

IBM MQ broker host

  • Type: string

  • Importance: high

mq.port

IBM MQ broker port

  • Type: int

  • Default: 1414

  • Importance: high

mq.connection.list

For IBM’s HA/DR support with multiple MQ instances, enter hosts as comma-separated values, for example, host1:port1, host2:port2. Configure the connector with a reasonable value for max.retry.time to ensure it has sufficient time to switch over to another instance before failing.

  • Type: string

  • Importance: high

mq.queue.manager

The name of the queue manager.

  • Type: string

  • Importance: high

mq.channel

The channel for client connections.

  • Type: string

  • Default: “”

  • Importance: high

mq.ssl.cipher.suite

The CipherSuite for SSL connections.

  • Type: string

  • Default: “”

  • Importance: high

mq.ssl.fips.required

Whether SSL FIPS is required.

  • Type: boolean

  • Importance: high

mq.ssl.peer.name

Sets a distinguished name (DN) pattern. If sslCipherSuite is set, this pattern can ensure that the correct queue manager is used. The connection attempt fails if the distinguished name provided by the queue manager does not match this pattern.

  • Type: string

  • Default: “”

  • Importance: high

Number of tasks for this connector

tasks.max

Maximum number of tasks for the connector.

  • Type: int

  • Valid Values: [1,…]

  • Importance: high

Additional Configs

header.converter

The converter class for the headers. This is used to serialize and deserialize the headers of the messages.

  • Type: string

  • Importance: low

producer.override.compression.type

The compression type for all data generated by the producer. Valid values are none, gzip, snappy, lz4, and zstd.

  • Type: string

  • Importance: low

producer.override.linger.ms

The producer groups together any records that arrive in between request transmissions into a single batched request. More details can be found in the documentation: https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#linger-ms.

  • Type: long

  • Valid Values: [100,…,1000]

  • Importance: low

value.converter.allow.optional.map.keys

Allow optional string map key when converting from Connect Schema to Avro Schema. Applicable for Avro Converters.

  • Type: boolean

  • Importance: low

value.converter.auto.register.schemas

Specify if the Serializer should attempt to register the Schema.

  • Type: boolean

  • Importance: low

value.converter.connect.meta.data

Allow the Connect converter to add its metadata to the output schema. Applicable for Avro Converters.

  • Type: boolean

  • Importance: low

value.converter.enhanced.avro.schema.support

Enable enhanced schema support to preserve package information and Enums. Applicable for Avro Converters.

  • Type: boolean

  • Importance: low

value.converter.enhanced.protobuf.schema.support

Enable enhanced schema support to preserve package information. Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.flatten.unions

Whether to flatten unions (oneofs). Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.generate.index.for.unions

Whether to generate an index suffix for unions. Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.generate.struct.for.nulls

Whether to generate a struct variable for null values. Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.int.for.enums

Whether to represent enums as integers. Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.latest.compatibility.strict

Verify latest subject version is backward compatible when use.latest.version is true.

  • Type: boolean

  • Importance: low

value.converter.object.additional.properties

Whether to allow additional properties for object schemas. Applicable for JSON_SR Converters.

  • Type: boolean

  • Importance: low

value.converter.optional.for.nullables

Whether nullable fields should be specified with an optional label. Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.optional.for.proto2

Whether proto2 optionals are supported. Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.scrub.invalid.names

Whether to scrub invalid names by replacing invalid characters with valid characters. Applicable for Avro and Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.use.latest.version

Use latest version of schema in subject for serialization when auto.register.schemas is false.

  • Type: boolean

  • Importance: low

value.converter.use.optional.for.nonrequired

Whether to set non-required properties to be optional. Applicable for JSON_SR Converters.

  • Type: boolean

  • Importance: low

value.converter.wrapper.for.nullables

Whether nullable fields should use primitive wrapper messages. Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

value.converter.wrapper.for.raw.primitives

Whether a wrapper message should be interpreted as a raw primitive at root level. Applicable for Protobuf Converters.

  • Type: boolean

  • Importance: low

errors.tolerance

Use this property if you would like to configure the connector’s error handling behavior. WARNING: This property should be used with CAUTION for SOURCE CONNECTORS as it may lead to dataloss. If you set this property to ‘all’, the connector will not fail on errant records, but will instead log them (and send to DLQ for Sink Connectors) and continue processing. If you set this property to ‘none’, the connector task will fail on errant records.

  • Type: string

  • Default: none

  • Importance: low

key.converter.key.schema.id.serializer

The class name of the schema ID serializer for keys. This is used to serialize schema IDs in the message headers.

  • Type: string

  • Default: io.confluent.kafka.serializers.schema.id.PrefixSchemaIdSerializer

  • Importance: low

key.converter.key.subject.name.strategy

How to construct the subject name for key schema registration.

  • Type: string

  • Default: TopicNameStrategy

  • Importance: low

value.converter.decimal.format

Specify the JSON/JSON_SR serialization format for Connect DECIMAL logical type values with two allowed literals:

BASE64 to serialize DECIMAL logical types as base64 encoded binary data and

NUMERIC to serialize Connect DECIMAL logical type values in JSON/JSON_SR as a number representing the decimal value.

  • Type: string

  • Default: BASE64

  • Importance: low

value.converter.flatten.singleton.unions

Whether to flatten singleton unions. Applicable for Avro and JSON_SR Converters.

  • Type: boolean

  • Default: false

  • Importance: low

value.converter.ignore.default.for.nullables

When set to true, this property ensures that the corresponding record in Kafka is NULL, instead of showing the default column value. Applicable for AVRO,PROTOBUF and JSON_SR Converters.

  • Type: boolean

  • Default: false

  • Importance: low

value.converter.reference.subject.name.strategy

Set the subject reference name strategy for value. Valid entries are DefaultReferenceSubjectNameStrategy or QualifiedReferenceSubjectNameStrategy. Note that the subject reference name strategy can be selected only for PROTOBUF format with the default strategy being DefaultReferenceSubjectNameStrategy.

  • Type: string

  • Default: DefaultReferenceSubjectNameStrategy

  • Importance: low

value.converter.replace.null.with.default

Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used. Applicable for JSON Converter.

  • Type: boolean

  • Default: true

  • Importance: low

value.converter.schemas.enable

Include schemas within each of the serialized values. Input messages must contain schema and payload fields and may not contain additional fields. For plain JSON data, set this to false. Applicable for JSON Converter.

  • Type: boolean

  • Default: false

  • Importance: low

value.converter.value.schema.id.serializer

The class name of the schema ID serializer for values. This is used to serialize schema IDs in the message headers.

  • Type: string

  • Default: io.confluent.kafka.serializers.schema.id.PrefixSchemaIdSerializer

  • Importance: low

value.converter.value.subject.name.strategy

Determines how to construct the subject name under which the value schema is registered with Schema Registry.

  • Type: string

  • Default: TopicNameStrategy

  • Importance: low

Auto-restart policy

auto.restart.on.user.error

Enable connector to automatically restart on user-actionable errors.

  • Type: boolean

  • Default: true

  • Importance: medium

Troubleshooting

MQRC_BACKED_OUT (2003) Errors

Symptom

The connector logs show frequent MQRC_BACKED_OUT errors (IBM MQ reason code 2003).

Explanation

This error indicates that a transaction to commit records on the IBM MQ side has been rolled back. This typically occurs when the acknowledgment call to IBM MQ times out. The connector receives messages from IBM MQ and buffers them based on the max.pending.messages configuration (default: 2000). If the time to acknowledge these messages exceeds IBM MQ’s transaction timeout, IBM MQ will roll back the transaction, resulting in MQRC_BACKED_OUT errors and message redelivery.

Resolution

  1. Reduce max.pending.messages: Lower the max.pending.messages configuration value to reduce the number of messages buffered before acknowledgment. This decreases the time between message retrieval and acknowledgment.

    Example: Reduce from the default 2000 to 500:

    {
      "max.pending.messages": "500"
    }
    

    To update the configuration in Confluent Cloud:

    • Navigate to your connector in the Confluent Cloud Console

    • Click Settings > Configuration

    • Locate the Max pending messages field

    • Update the value to 500 (or another appropriate value)

    • Click Continue and then Launch to apply the changes

  2. Monitor performance: After reducing max.pending.messages, monitor the connector’s throughput in the Confluent Cloud Console. If performance is impacted, gradually increase the value while watching for MQRC_BACKED_OUT errors in the connector logs.

  3. Check IBM MQ transaction logs: Consult your IBM MQ administrator to review queue manager transaction logs and verify if there are transaction timeout settings that may need adjustment.

  4. View connector logs: To view connector error logs in Confluent Cloud, navigate to your connector and click the Logs tab. Look for MQRC_BACKED_OUT entries to monitor the frequency of these errors.

For more information, see IBM MQ Reason Code 2003 Documentation

Frequently asked questions

Find answers to frequently asked questions about the IBM MQ Source connector for Confluent Cloud.

Why is the connector failing with Could not connect to the IbmMQ hosts error?

This error indicates the connector cannot establish a connection to your IBM MQ Queue Manager. Verify the following common issues:

  • Queue Manager availability: Verify the IBM MQ Queue Manager is running and listening on the configured host and port.

  • Network connectivity: * Ensure firewall rules, security groups, or Network Access Control Lists allow traffic from Confluent Cloud to your IBM MQ server. * Review egress IP addresses for your Confluent Cloud region and whitelist them in your firewall configuration. For more information, see Public Egress IP Addresses for Confluent Cloud Connectors.

  • Connection parameters: In the connector configuration, confirm the following settings are correct:

    • mq.hostname: The IBM MQ server hostname or IP address.

    • mq.port: The IBM MQ listener port.

    • mq.queue.manager: The exact Queue Manager name (case-sensitive).

    • mq.channel.name: The server connection channel name configured in IBM MQ.

  • SSL/TLS configuration: If using encrypted connections, ensure SSL/TLS certificates are properly configured and valid.

  • DNS resolution: Verify the hostname resolves correctly from the Confluent Cloud environment.

Test connectivity from your network using tools like telnet or nc to verify the IBM MQ port is accessible.

Why am I seeing duplicate messages in my Kafka topic?

Duplicate messages can occur due to connector task failures and restarts. The connector provides at-least-once delivery semantics by default, which means messages may be redelivered in certain failure scenarios.

To minimize duplicate messages:

  • Enable EOS: Enable EOS durings connector creation. For more information, see Exactly once semantics. EOS cannot be enabled on existing connectors; you must create a new connector with EOS enabled.

  • Use unique message identifiers: Leverage IBM MQ message IDs as Kafka message keys to enable consumer-side deduplication.

Why does the connector show messages processed but no data appears in my Kafka topic?

If connector metrics show messages being processed but the destination topic appears empty, verify the following:

  • Topic configuration: Confirm kafka.topic in your connector configuration matches the topic you are querying. Topic names are case-sensitive.

  • SMTs: Review any configured SMTs to ensure they are not filtering out all messages. Check the connector configuration for transforms.* properties.

  • Consumer offset: Verify your consumer is reading from the beginning of the topic or the correct offset. Use --from-beginning when testing with the Confluent CLI consumer.

  • Topic permissions: Ensure the connector’s service account has write permissions to the destination topic. Check ACL configurations in the Confluent Cloud Console.

  • Connector logs: Review connector logs for write errors, permission denials, or serialization failures that might prevent messages from being written.

Why does the connector restart frequently or open multiple connections to IBM MQ?

Frequent connector restarts can exhaust IBM MQ connection limits and impact performance. Common causes include:

  • Connection timeouts: Network latency or transient connectivity issues may cause health checks to fail. Review network stability between Confluent Cloud and your IBM MQ server.

  • IBM MQ connection limits: Verify your Queue Manager has sufficient connection limits configured. Check IBM MQ error logs for connection limit errors like MQRC_MAX_CONNS_LIMIT_REACHED.

  • SSL/TLS handshake failures: If using SSL/TLS, ensure certificates are valid and properly configured. Check certificate expiration dates and chain validity.

  • Authentication issues: Verify mq.username and mq.password are correct and the user has appropriate permissions in IBM MQ.

  • Resource constraints: Monitor connector task resource utilization. Insufficient memory or CPU can cause task failures.

What does error code JMSWMQ2008 mean and how do I resolve it?

Error code JMSWMQ2008 indicates Failed to create MQQueueManager for connection. This error typically occurs when:

  • Queue Manager not available: The IBM MQ Queue Manager is not running or is restarting. Verify the Queue Manager status using IBM MQ commands (dspmq).

  • Connection limits reached: The Queue Manager has reached its maximum connection limit. Check the MaxChannels and MaxActiveChannels settings in your Queue Manager configuration.

  • Authentication failures: User credentials are invalid or the user lacks required permissions. Verify mq.username and mq.password are correct.

  • Channel configuration mismatch: The mq.channel.name specified in the connector configuration does not exist or is not properly defined in IBM MQ.

  • Network connectivity issues: Intermittent network problems between Confluent Cloud and IBM MQ can cause connection failures.

Why are my messages appearing as JSON strings instead of structured JSON?

This issue is caused by incorrect output.data.format configuration. To receive properly structured JSON data:

  • Use JSON_SR for Schema Registry: Set output.data.format to JSON_SR when using Confluent Cloud Schema Registry for schema management and validation. This requires Confluent Cloud Schema Registry to be enabled. See Quick Start for Schema Management on Confluent Cloud for details.

  • Use JSON for plain JSON: Set output.data.format to JSON if you want JSON format without schema validation.

  • Avoid STRING format: Do not use output.data.format=STRING if you need structured JSON data. The STRING format treats message content as plain text.

Next Steps

For an example that shows fully-managed Confluent Cloud connectors in action with Confluent Cloud for Apache Flink, see the Cloud ETL Demo. This example also shows how to use Confluent CLI to manage your resources in Confluent Cloud.

../_images/topology.png