Kafka Consumer Streams Adapter

The Kafka Consumer Streams Adapter connects with a Kafka queue to pull messages continuously.

The following table provides an overview of the Kafka Consumer Streams Adapter:

System name Kafka Consumer Streams Adapter
Description This adapter is used to connect with a Kafka messaging queue to retrieve business documents.
Business usage Use this adapter to retrieve documents from Kafka queue.
Usage example Kafka Consumer Streams Adapter connects to the Kafka queue using the configuration provided and retrieve documents. The adapter also saves documents in the mailbox.
Preconfigured? No
Requires third-party files? No
Platform availability All Sterling B2B Integrator supported platforms.
Related services N/A
Application requirements A Kafka server.
Initiates business processes? This service initiates KafkaStreamServiceMailbox business processes.
Invocation This service is not invoked from a business process.
Restrictions N/A
Persistence level Default
Testing considerations N/A

Configuring Kafka Consumer Streams Adapter

To configure the Kafka Consumer Streams Adapter, you must specify field settings in Sterling B2B Integrator:

Field Description
Name Name this service will have in Sterling B2B Integrator. Required.
Description Description of service. Required.
Environment Nodes where the Kafka Consumer Streams Adapter is deployed. The values are - nodes in the cluster, adapter containers, All ASI nodes, All ASI nodes plus all Adapter Container Nodes, and All Adapter Container Nodes. To scale the Kafka Consumer Streams Adapter as and when new nodes are added to the cluster, the options All ASI nodes, All ASI nodes plus all Adapter Container Nodes, and All Adapter Container Nodes are introduced.
Select a Group Select one of the options:
  • None – You do not want to include this configuration in a group at this time. (default)
  • Create New Group – You can enter a name for a new group in this field, which will then be created along with this configuration.
  • Select Group – If you have already created one or more groups for this service type, they are displayed in the list. Select a group from the list.
Note: For more information about groups, see Managing Services and Adapters.
Topic Topic to which the Kafka Consumer Streams Adapter connects.
KeyDeserializer Deserializer class for key that implements the org.apache.kafka.common.serialization.Deserializer interface.
ValueDeserializer Deserializer class for value that implements the org.apache.kafka.common.serialization.Deserializer interface.
BootStrapServers A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. This list should be in the form: host1:port1,host2:port2,....
SecurityAction Protocol used to communicate with brokers. Valid values are PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL.
SASLMechanism SASL mechanism used for client connections. This may be any mechanism for which a security provider is available.
SASLJaasConfig JAAS login context parameters for SASL connections in the format used by JAAS configuration files. JAAS configuration file format is described here: JAAS Login Configuration File.
For example,
listener.name.sasl_ssl.scram-sha-256.sasl.jaas.config=com.example.ScramLoginModule required;
TrustStorePath The location of the trust store file.
TrustStorePassword The password for the trust store file.
KeyStorePath The location of the key store file. This is optional for client and can be used for two-way authentication for client.
KeyStorePassword The store password for the key store file.
Document Storage Type Type of storage required for the document to be stored at. It can be File System, Database or Object Store.
Save file to mailbox? To store the document in the mailbox, select Yes. System default is No.
Mailbox User The mailbox user for which the document must be stored.
Note: Ensure the user is given the required permissions to store the document.
Mailbox Path Mailbox path that the user has permission to use. If a user is set up with a virtual root, the MailboxPath is a relative path to the virtual root. The virtual root is not visible to the business process. Required. Valid values are UNIX-style paths where the folders correspond to a mailbox name. A path must begin with the / (slash) character and use the / to separate mailboxes in the hierarchy. Following is an example of a valid mailbox path:/Customers/DallasHardware/Inbound

The following characters cannot be used in a mailbox name:

? < > | ' " : \ / % *
Note: For Global Mailbox enabled Trading Partner, select the mailbox path as / (forward slash).
Use Global Mailbox Whether to use only Global Mailbox or only traditional Sterling B2B Integrator mailboxes. The following values are valid:
  • Yes - Global Mailbox is used.
  • No (default) - Global Mailbox is not used.
Note: To configure the SSL/SASL files for Certified Containers, Kafka client truststore, keystore and Jaas configuration files can be copied under volume mapped to /ibm/resources. It is the same volume that is used as persistent volume for appResourcesPVC section in values.yaml.
For example, while specifying the paths in the Kafka Consumer Streams Adapter: