Kafka Consumer Commit Adapter

Introduction

The TIBCO StreamBase® Output Adapter for Apache Kafka Consumer Commit allows StreamBase applications to perform commit operations for a given consumer operator. The commit can be a commit of all topics and partitions or be a more granular approach and specify the topic, partition, and offset to commit.

The Apache Kafka adapter suite is implemented against the version of the Kafka libraries listed on the Supported Configurations page.

Adapter Properties

This section describes the properties you can set for this adapter, using the various tabs of the Properties view in StreamBase Studio.

General Tab

Name: Use this required field to specify or change the name of this instance of this component, which must be unique in the current EventFlow module. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.

Adapter: A read-only field that shows the formal name of the adapter.

Start with application: If this field is set to Yes (default) or to a module parameter that evaluates to true, this instance of this adapter starts as part of the JVM engine that runs this EventFlow module. If this field is set to No or to a module parameter that evaluates to false, the adapter instance is loaded with the engine, but does not start until you send an sbadmin resume command, or until you start the component with StreamBase Manager.

Enable Error Output Port: Select this check box to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports to learn about Error Ports.

Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.

Adapter Properties Tab

Property Type Description
Linked Consumer string The name of the consumer adapter that this adapter will link to for performing the commit operation.
Linked Consumer Field string The field name of the input tuple that contains the fully qualified name of the consumer adapter that this adapter will link to for performing the commit operation.
Synchronous Commit check box If enabled the commit action will be done synchronously.
Enable Status Port check box When enabled, the adapter sends informational data on the status port about various adapter states. For more information see Status Port.
Log Level INFO Controls the level of verbosity the adapter uses to issue informational traces to the console. This setting is independent of the containing application's overall log level. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE.

Concurrency Tab

Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.

Caution

Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.

Commit Input Port

Use the Commit input port to send commit operations to the adapter.

Commit Port Schema

All of the commit fields are optional. If the topic is empty or null, or the partition is null or less than 0, or the offset is null or less than 0 then a default commit all at current offset operation will be done. All fields must be specific for a granular commit to be completed. All other fields passed into this adapter are ignored.

  • topic (optional), string. The topic to perform the commit on.

  • partition (optional), int. The partition to perform the commit on.

  • offset (optional), long. The offset to perform the commit on. The committed offset should always be the offset of the next message that your application will read. Thus, when calling commit you should add one to the offset of the last message processed.

  • Linked Consumer Field (optional), string. The the fully qualified name of the consumer operator that this message is linked to. This field is optional.

Status Output Port

You can optionally enable the status output port for this adapter instance by means of the Enable Status Port property in the Adapter Properties page of the Properties view. Use the status port to retrieve status output messages from the adapter.

Status Port Schema

  • type, string. The type of status information emitted. Status types are:

    • Error — This message relates to an error that occurred.

    • Warn — This message relates to a warning that the user should be aware of.

    • Info — This message relates to extra status information.

  • action, string. Valid values are:

    • Commit — This message is output for success or error of the commit operation.

  • object, string. This field will contain a string consisting of the topic-partition. If a synchronous commit is done without specifying a topic and partition, then the object field will contain an empty string.

  • message, string. This is a formatted human-readable message that explains the status message.

  • time, timestamp. The time the status message occurred.

  • inputTuple, tuple. The input tuple that was used to start the commit.

Suspend and Resume

Suspend

When this operator is suspended, it will no longer process tuples.

Resume

When this operator is resumed, it will continue to process tuples.