Adapter commands for consumers

Kafka adapter commands for consumers are valid for input data sources. For additional details, see the consumer configuration information in the Apache Kafka documentation.

-GROUPID groupID
-GID groupID
A unique string that identifies the consumer group that a consumer belongs to. This property enables Kafka group management, which is used when the -TP command specifies only topic names without topic partitions. The default is a null string.

Related Kafka consumer configuration: group.id

-OFFSETCOMMITSTRATEGY {manual | auto | never}
-OCS {manual | auto | never}
The policy that the adapter uses to commit an offset when it consumes a message. The policy is one of the following:
manual
The Kafka adapter commits the offset when it commits the transaction, as defined by the Transaction > Scope setting on the input card of the map. This is the default.
auto
The Kafka cluster periodically commits the offset.
never
Neither the Kafka cluster nor the Kafka adapter commits the offset.
-FETCHMINBYTES size
-FMIB size
The minimum amount of data, in bytes, that must accumulate before the server returns the data to the consumer. The default data size is one byte, which means the server responds to a data request as soon as any data is available to return.

Related Kafka consumer configuration: fetch.min.bytes

-FETCHMAXBYTES size
-FMAB size
The maximum amount of data, in bytes, that the server should return for a fetch request.

Related Kafka consumer configuration: fetch.max.bytes

-AUTOOFFSETRESET {latest | earliest | none}
-AOR {latest | earliest | none}
The offset position to automatically use when no previous offset exists.
The offset is one of the following:
latest
Starts consuming new messages from the most recent offset. This is the default.
earliest
Starts consuming from the oldest available record by automatically resetting the offset to the earliest offset.
none
Reports an error.

Related Kafka consumer configuration: auto.offset.reset

-SYNCHRONIZED
-SYNC
Specifies that the Launcher listener thread is to operate synchronously. The listener waits to notify a map of an event (a message added to a topic) until the map acknowledges that it processed the previous event. If the map fails, the listener does not report subsequent events unless the -ETP command is specified. With the -ETP command, when the Launcher listener records the failed event on the error topic, the listener is unblocked and proceeds to report new events.
-ERRORTOPIC topic
-ETP topic
The name of the error topic where messages that result in an error are recorded.
  • The Command Server records the error at the time of transaction rollback. In a map, the input card Transaction > Scope setting controls when a transaction failure is processed by the adapter.
  • The Launcher records the error when the listener thread is blocked because it's waiting for the status of the event processing, as specified by the -SYNC command.
After recording the error, the listener resumes processing new events.
-ISOLATIONLEVEL {read_committed | read_uncommitted}
-IL {read_committed | read_uncommitted}
Controls the visibility of messages that are part of a transaction.
read_committed
Only messages from transactions that are committed (and messages that were not part of a transaction) are visible to consumers. This is the default.
read_uncommitted
All messages are visible to consumers, even if they were part of an aborted transaction.

Related Kafka consumer configuration: isolation.level

-QUANTITY {S | number}
-QTY {S | number}
The number of messages to consume, or S to consume all available messages.

The default value is 1. If you specify a value other than 1, you must set the FetchAs input card setting to Burst and the FetchUnit input card setting to 1 in the map.

-LISTEN {seconds | S | 0}
-LSN {seconds | S | 0}
The wait time for messages:
seconds
The number of seconds that the consumer waits for messages to arrive.
S
Wait for an unlimited time for messages to arrive. This is the default.
0
Consume all available messages and do not wait for new messages to arrive.
-LOGICALMESSAGECOUT count
-LMC count

Logical message count. Specifies the number of Kafka messages to concatenate and return as a single logical message from the adapter. By default, the adapter returns each Kafka message as a separate logical message. To concatenate all available messages, specify 0.

This command is valid only in logical message mode (-LMM command). Logical message mode is not valid in a Launcher scenario.

-LOGICALMESSAGESIZE bytes
-LMS bytes
Logical message buffer-size limit, in bytes. The adapter buffers messages until it exceeds this limit, then returns all buffered messages as a single logical message.

This command is valid only in logical message mode (-LMM command). Logical message mode is not valid in a Launcher scenario.