InfoCDC / data queue source connector
The source connector continuously monitors an IBM i data queue for new messages and publishes them to a Kafka topic. Use it to stream data change events from InfoCDC replication queues, or messages from any other data queue, to Kafka.
| Connector class | com.infoviewsystems.kafka.connect.as400.core.AS400SourceConnector |
| Type | Source |
| Typical use | Real-time replication of IBM i tables with InfoCDC, data queue streaming |
Configure the connection properties and the license together with the properties on this page.
Configuration properties
Configure the following source connector properties.

| Parameter | Description | Mandatory | Default value | Configuration key |
|---|---|---|---|---|
| Data Queue | Name of the data queue to read from. | Required | null | as400.read.dataqueue.name |
| Library | Library of the data queue to read from. | Required | null | as400.read.dataqueue.library |
| Key | Required for keyed data queues. Leave blank for non-keyed data queues. Used to read any message from the data queue. | Optional | null | as400.read.dataqueue.key |
| Key Search Type | Required for keyed data queues. Available search types: equal, not equal, greater than, less than, greater than or equal, less than or equal. | Optional | null | as400.read.dataqueue.key.search.type |
| Keep messages in Queue | Leave unchecked unless you want to leave the message in the queue after reading. | Optional | true | as400.source.keep.message |
| Format File Name | Treats the data queue entry as an externally defined data structure. When set, the connector dynamically retrieves the record format from the specified IBM i file and parses the received data queue entry into a map of field name / value pairs. The connector performs the type conversion and supports all types, such as packed and date / time. | Optional | null | as400.source.format.name |
| Format File Library | Library of the format file. If you do not specify it, the connector locates the format file through the connection library list. | Optional | null | as400.source.file.library |
| Format File Exception Action | Action when a message fails because of a format file error. The connector either discards the message or writes it back to the queue, depending on the option you select. | Optional | discard | as400.source.format.action |
| Is InfoCDC Configured | Set to true if InfoCDC is subscribed. |
Optional | true | as400.isInfoCDCConfigured |
| Is Sorting is required | Set to true if records must be sorted. |
Optional | true | as400.sort.records |
| Number of Consumers | Number of internal threads that poll data from the IBM i system in parallel. A higher value enables concurrent processing of data queue entries and improves performance by optimizing the internal thread pool handling of multi-threaded connector tasks. | Optional | 4 | as400.source.consumer.numbers |
| Read Concurrency | Number of concurrent executors that run for each consumer. | Optional | 0 | as400.source.concurrency |
| Poll interval | Poll interval in ms when the queue is empty. | Optional | 1000 | as400.source.poll.interval |
| Flush Percentage | Fraction of the buffered records that is flushed in each poll cycle. | Optional | 75 | as400.source.flush.percentage |
| Data Queue Wait Time | Number of seconds to wait when the queue contains no entries. | Optional | 0 | as400.source.dq.wait.time |
| Column Naming Strategy | Determines whether short column names or full (actual) column names are used. | Optional | SHORT | as400.source.column.naming.strategy |
| Overflow Handling Strategy | Controls how numeric overflow values are handled. IGNORE keeps the original value, which can cause problems downstream. MAP replaces the value with a safe default and stores the original value in OVERFLOW_MAP. |
Optional | IGNORE | as400.source.field.overflow |
| AS400 Logical Type Conversion Enabled | Enables or disables the conversion of IBM i date, time, and timestamp values into Kafka Connect logical types. | Optional | false | as400.logical.conversion.enabled |
| Date Format Pattern | Date format pattern. | Optional | "yyyy-MM-dd" | date.format.pattern |
| Time Format Pattern | Time format pattern. | Optional | "HH:mm:ss" | time.format.pattern |
| Timestamp Format Pattern | Timestamp format pattern. | Optional | "yyyy-MM-dd HH.mm.ss.SSS" | timestamp.format.pattern |
Date, time, and timestamp patterns
Valid date patterns:
- With different separators:
yyyy/MM/ddyyyy.MM.ddyyyy-MM-ddyyyy:MM:dd
- With interchanged date, month, and year:
yyyy-MM-ddMM-dd-yyyyyyyy-dd-MM
Valid time patterns:
HH:mm:ssHH.mm.ssHH/mm/ssHH-mm-ss
Valid timestamp patterns:
- With different separators:
yyyy/MM/dd HH:mm:ssyyyy-MM-dd HH.mm.ssyyyy-MM-dd HH.mm.ss.SSS
- With interchanged date, month, and year:
yyyy-MM-dd HH:mm:ssMM-dd-yyyy HH.mm.ssyyyy-dd-MM HH.mm.ss.SSS
Note
You can use the separators ., -, and / for the time part.
Samples
The following samples show the source connector configuration for each converter.
Sample JSON for the source connector with JsonConverter
{
"name": "AS400SourceConnector",
"config": {
"connector.class": "com.infoviewsystems.kafka.connect.as400.core.AS400SourceConnector",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"as400.url": "your-ibm-i-host",
"as400.userId": "your-username",
"as400.password": "your-password",
"as400.secure.connection": "false",
"as400.license.protocol": "FILE",
"as400.license.path": "/opt",
"license.fileName": "as400-license.lic",
"as400.read.dataqueue.name": "your-data-queue-name",
"as400.read.dataqueue.library": "your-Library",
"as400.source.format.name": "format-file-name",
"as400.source.file.library": "your-format-file-library",
"source.kafka.topic": "Test",
"topic.creation.default.replication.factor": "1",
"topic.creation.default.partitions": "1",
"value.converter.schemas.enable": "false",
"schema.validation.mode": "STRICT"
/*Below are optional (Required if security enabled) */
// "security.protocol": "SASL_SSL",
// "sasl.mechanism": "PLAIN/SCRAM",
// "sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"<api-key>\" password=\"<api-secret>\";"
}
}
Sample JSON for the source connector with JsonSchemaConverter and Schema Registry
{
"name": "AS400SourceConnector",
"config": {
"connector.class": "com.infoviewsystems.kafka.connect.as400.core.AS400SourceConnector",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "io.confluent.connect.json.JsonSchemaConverter",
"as400.url": "your-ibm-i-host",
"as400.userId": "your-username",
"as400.password": "your-password",
"as400.secure.connection": "false",
"as400.license.protocol": "FILE",
"as400.license.path": "/opt",
"license.fileName": "as400-license.lic",
"as400.read.dataqueue.name": "your-data-queue-name",
"as400.read.dataqueue.library": "your-Library",
"as400.source.format.name": "format-file-name",
"as400.source.file.library": "your-format-file-library",
"source.kafka.topic": "Test",
"topic.creation.default.replication.factor": "1",
"topic.creation.default.partitions": "1",
"value.converter.schema.registry.url": "http://localhost:8081",
"schema.validation.mode": "STRICT"
/*Below are optional (Required if security enabled) */
// "security.protocol": "SASL_SSL",
// "sasl.mechanism": "PLAIN/SCRAM",
// "sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"<api-key>\" password=\"<api-secret>\";"
}
}
Sample JSON for the source connector with AvroConverter and Schema Registry
{
"name": "AS400SourceConnector",
"config": {
"connector.class": "com.infoviewsystems.kafka.connect.as400.core.AS400SourceConnector",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "io.confluent.connect.avro.AvroConverter",
"as400.url": "your-ibm-i-host",
"as400.userId": "your-username",
"as400.password": "your-password",
"as400.secure.connection": "false",
"as400.license.protocol": "FILE",
"as400.license.path": "/opt",
"license.fileName": "as400-license.lic",
"as400.read.dataqueue.name": "your-data-queue-name",
"as400.read.dataqueue.library": "your-Library",
"as400.source.format.name": "format-file-name",
"as400.source.file.library": "your-format-file-library",
"source.kafka.topic": "Test",
"topic.creation.default.replication.factor": "1",
"topic.creation.default.partitions": "1",
"value.converter.schema.registry.url": "http://localhost:8081",
"schema.validation.mode": "STRICT"
/*Below are optional (Required if security enabled) */
// "security.protocol": "SASL_SSL",
// "sasl.mechanism": "PLAIN/SCRAM",
// "sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"<api-key>\" password=\"<api-secret>\";"
}
}
Reading from a keyed data queue
To read from a keyed data queue, specify the key and the search type with the as400.read.dataqueue.key and as400.read.dataqueue.key.search.type properties. Add them to any of the samples above:
"as400.read.dataqueue.key": "your-key",
"as400.read.dataqueue.key.search.type": "greater than or equal",
For example, as400.read.dataqueue.key=123 reads from a keyed data queue by the key 123, and as400.read.dataqueue.key.search.type=equal searches for entries where the key equals the specified value. You can replace equal with another search type: greater_than, less_than, not_equal, greater_than_or_equal, or less_than_or_equal.
Source acknowledgement
You can acknowledge a message in two ways: by writing an acknowledgement to the response data queue, or by calling a program with the necessary parameters.
To write an acknowledgement to a data queue, configure the following properties:
| Parameter | Description | Mandatory | Default value | Configuration key |
|---|---|---|---|---|
| Data Queue | Data queue to which the response is written. | Optional | null | as400.write.dataqueue.name |
| Library | Response data queue library. | Optional | null | as400.write.dataqueue.library |
| Is Keyed DataQ | Response data queue expression. | Optional | null | as400.write.dataqueue.key |
To call a program for the acknowledgement, configure the following properties:
| Parameter | Description | Mandatory | Default value | Configuration key |
|---|---|---|---|---|
| Program name | Name of the program. | Optional | null | as400.program.name |
| Program Library | Library of the program you want to invoke | Optional | null | as400.program.library |
| Program Library List | Library list. | Optional | null | as400.program.libraryList |
The following configuration sends the response through a program call. The programs INFOCDCCOM/CDCPGMACKR and INFOCDCCOM/CDCPGMACKB accept and process the acknowledgements.
"source.ack.type": "Program",
"as400.program.name": "CDCPGMACKR", // or "CDCPGMACKB"
"as400.program.library": "INFOCDCCOM",
"as400.program.libraryList": "INFOCDCCOM, INFOCDCDTA",
Routing to multiple topics
One source connector can read a data queue that receives changes from several tables and publish each table to its own topic. Set "source.multiTopic": "true" and leave the format file properties empty. For the full procedure, see Routing messages from a single data queue to multiple topics.
Related pages
- Single message transforms: send tombstones for delete events and reorder columns
- Schema Registry: compatibility settings for the Avro and JSON Schema converters
- Hardening and scaling: consumer and concurrency tuning