Skip to main content
Skip table of contents

Apache Kafka Subscriber

The adapter enables you to subscribe messages on a specific topic, unsubscribe, or read the last message.

Properties

Operation

Defines the operation executed by the adapter.

Possible values:

  • Assign: Manually assigns a list of partitions to a consumer. 
  • Subscribe: Subscribes to a topic to receive messages.

  • Unsubscribe: Disconnects client and topic and unsubscribes from a specific topic.
  • Last offset: Returns the offset of a specific client for its subscribed topic.


Parameters

Adapter

Adapter main class (do not change!)

Possible values: de.softproject.integration.adapter.apachekafka.ApacheKafkaSubscriberAdapter: Main class (default)

trustStorePathDefines where the trust store to be used is located.
trustStorePasswordPassword for the trust store
keyStorePathDefines where the key store to be used is located.
keystorePasswordPassword for the key store
privateKeyPasswordPassword of the private key in the keystore file
username

User name for SASL/PLAIN authentication at the Kafka server

If you use this parameter, the configuration properties sasl.mechanism = PLAIN and security.protocol = SASL_SSL are set.
password

Password for SASL/PLAIN authentication at the Kafka server

If you use this parameter, the configuration properties sasl.mechanism = PLAIN and security.protocol = SASL_SSL are set.
clusterId

ID of the cluster with which the topic is subscribed

Possible values: Cluster ID

The ID of the cluster can be found in the file apachekafka-config.xml. It is located in the id attribute of the Cluster element.

ClientId

ID of the client with which the topic is subscribed

Possible values: Client ID

The ID of the cliente can be found in the file apachekafka-config.xml. It is located in the id attribute of the Client element.

topic

Name of the topic to be subscribed to

Possible values: String consisting of alphanumeric ASCII characters, . (dot), _ (underscore) and - (hyphen) or comma-separated list of multiple strings to subscribe to multiple topics

process

Process that is executed after a message is received.

Possible values: String consisting of alphanumeric ASCII characters, . (dot), _ (underscore) and - (hyphen)

consumerPosition

Offset with which messages are received when a topic is subscribed to.

Possible values: Integer greater than 0

This parameter only has an effect if a single topic is subscribed to. If several topics are subscribed to, this parameter has no effect.

messageDataType

Data type of the message(s) to be published.

Possible values:

  • BYTES: Base64 encoded value
  • BYTEARRAY: Base64 encoded value
  • DOUBLE: Floating-point number
  • FLOAT: Floating-point number
  • INTEGER: Integer
  • LONG: Integer
  • SHORT: Integer
  • STRING (default): String
  • UUID: Java UUID

Messages with different data types can be published in a topic. To read the messages with the Apache Kafka Subscriber Adapter, the data type must be known and set correctly. For example, a message of the data type STRING cannot be read with the data type setting LONG. Therefore, all messages in a topic should be of the same data type.

keyDataType

Data type of the key

Possible values:

  • NONE (default): No data type

    If the subscriber has subscribed to a topic and the keyDataType has the value NONE, only messages without a key will be received. If the value is other than NONE, messages with all other data types are received. If the message has a key, the key is output as an attribute in the Content element.

  • BYTES: Base64 encoded value
  • BYTEARRAY: Base64 encoded value
  • DOUBLE: Floating-point number
  • FLOAT: Floating-point number
  • INTEGER: Integer
  • LONG: Integer
  • SHORT: Integer
  • STRING (default): String
  • UUID: Java UUID

The values of the trustStorePath, trustStorePassword, keyStorePath, keyStorePassword and privateKeyPassword parameters can also be defined in the apachekafka-config.xml file (see Apache Kafka).

The information about the adapter configuration overwrites the information in the apachekafka-config.xml. However, all parameters must be set for this. If not all parameters are set via the adapter configuration, the files from the apachekafka-config.xml are used.

If adapter parameters are used to override the SSL configuration of a particular client, then these values are retained until they are overridden again or the server is restarted.

Status values

1

The adapter operation was executed successfully.

-1An error occurred during the execution of the adapter.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.