Creating new accounts
Create an account for Kafka connector.
Procedure
What to do next
- If the Client type is Producer, enter the
following properties:
- Acknowledgments
- The number of acknowledgments the producer requires the lead broker to have received before
considering a request as complete. This controls the acknowledgments durability of messages that are
sent. For more information, see the Kafka documentation. The values that are allowed are as follows:
- None- Message durability is high data loss risk. The producer does not wait for any acknowledgment from the broker. The message is immediately added to the socket buffer and considered as sent. It cannot be confirmed that the server receives the message. The configuration does not take effect if you retry. The offset given back for each message is always be set to -1.
- Leader- Message durability is partial data loss risk. The lead broker writes the message to its local log but responds without awaiting for the full acknowledgement from all followers. If the leader fails immediately after acknowledging the record but before the followers replicate it, then the message is lost.
- Replica- Message durability is no data loss risk. The lead broker waits for the full set of in-sync replicas to acknowledge the message. This helps make sure that the message is not lost when at least one in-sync replica remains alive.
- Request timeout (ms)
- Maximum amount of time in milliseconds that the client waits for the response to a request. If the response is not received before the timeout elapses, the client resends the request if necessary or fail the request if retries are exhausted. The default value is 30000.
- Compression type
- The algorithm that is used to compress the messages before they are sent to the Kafka broker. Possible values are None, GZip, Snappy, LZ4, Zstandard. The default value is None.
- Message send retries
- Number of attempts by a Kafka producer to send a message to the Kafka broker if the initial attempt fails. This helps make sure that the messages are delivered reliably in a distributed system, even when the first attempt fails due to network problems, broker unavailability, or other temporary issues. The default value is INT32_MAX, which is 2147483647.
- Batch size (bytes)
- Batch size in which the Kafka producer consolidates the messages that are sent to the same partition together before sending to the Kafka broker. Sending messages in batches improves throughput by reducing the number of requests that are sent, thus making more efficient use of network resources. The default batch size is 16384.
- TCP send buffer (bytes)
- The size of the TCP sends buffer SO_SNDBUF in bytes when sending data. If the value is set to -1, Kafka defaults to the operating system settings for the TCP send buffer size, letting the operating system manage the buffer size according to its own defaults and optimizations. The default value is 131072.
- If the Client type is Consumer, enter the
following properties:
- Enable auto commit
- Enables or disables the Kafka broker’s ability to automatically commit the consumer’s offset. When the value is set to True, auto-commit is enabled, the Kafka broker takes the responsibility for committing the consumer’s offset at the intervals that are specified in the Auto commit interval (ms)field. However, when the value is set to False, auto-commit by the Kafka broker is disabled, the Kafka connector is responsible for committing the consumer’s offsets after processing the messages. The default value is True.
- Auto commit interval (ms)
- Frequency in milliseconds that the Kafka broker auto-commits the consumer offsets to the Kafka server, if the Enable auto commit is True. The default value is 5000.
- Auto offset reset
- Defines how the Kafka consumer behaves when it needs to start reading from a topic and without a
previously committed offset, or when the committed offset is invalid or out of range. Select one of
the following values:
- Earliest- Consumer starts reading from the earliest offset available in the topic, meaning it reads all messages from the beginning of the topic if there are no previously committed offsets.
- Latest- Consumer starts reading from the latest offset, meaning it will receive only the new messages that are produced after the consumer starts. It does not process any historical messages that were produced before it started. Use this option when you care about new data and do not need to process historical messages. The field is the default setting for many Kafka clients.
- None- Default. Consumer returns exceptions when no previous offset is found for the consumer’s group and this value is set. Use this option when it is critical to handle cases where offsets are missing or invalid explicitly and when you must help ensure that no processing occurs if no offsets are available.
- Session timeout (ms)
- Time in milliseconds that the consumer waits for a response to a request before it times out and returns an error while using the Apache Kafka’s group management facility. The default value is 45000.
-
In the Security credentials section, provide the following information.
- Truststore
- Alias of the truststore configuration. The truststore contains trusted certificates that are used to determine the trust for the remote server peer certificates. You can add a Truststore certificate by selecting the "+" icon next to the Truststore Alias drop-down list. Available if the Security protocolis SASL_SSL or SSL.
- Keystore
- Alias for the keystore configuration. You can add a Keystore certificate by selecting the " "+"" icon next to the Keystore Alias dropdown list. Available if the Security protocol is SASL_SSL or SSL.
- JAAS config
- JAAS login context parameters in the format used by JAAS configuration files. Available if the Security protocol is SASL_PLAINTEXTor SASL_SSL. For example, org.apache.kafka.common.security.plain.PlainLoginModule required username=‘KafkaConnector’ password=‘cert@XXXX’.
- Other Properties
- In the Other properties section, you can specify any additional
properties that you prefer to add for the account. Type the property name and enter the value in the
corresponding input text field.
- Property name- Name of the property.
- Property value- Value for the property.
Note: If the Security protocol is set to SASL_PLAINTEXT or SASL_SSL, then the default value SASL mechanism is “GSSAPI”. If you want to use another SASL mechanism, configure in the Other properties field. For example, to configure the SASL mechanism to plain in the Other properties field, add the property sasl.mechanism = PLAIN.
-
Click Next. The Add account > Advanced settings page appears.
-
Configure the connection pooling manually in the Advanced settings page.
- Enable connection pooling
- Toggle the slider to right to enable configuration of the connection pooling details. Disable the connection pooling to use system-defined values. Connection pooling is disabled by default.
- Minimum pool Size
- Number of connections to create when the connection is enabled. The system maintains the specified Minimum Pool Size of connections, irrespective of whether these connections remain idle.
- Maximum pool Size
- Maximum number of connections that can exist at a time in the connection pool.
- Block timeout
- Number of milliseconds that webMethods Integration waits to obtain a connection with the IBM®
Power® system before it times out and returns an error. For
example, you have a pool with maximum pool size of 20. When receiving 30 simultaneous connection
requests, 10 requests are queued, awaiting a connection from the pool.
- If you set the Block timeout value to 5000, the 10 requests wait for 5 seconds to establish a connection before they time out and return an error. When the services that use the connections require 10 seconds to complete and return connections to the pool, the pending requests encounter failure and return an error stating the unavailability of the connections.
- If you set the Block timeout value too high, you might encounter an error. If a request contains errors that delay the response, other requests will not be sent. This Block timeout must be tuned in along with the Maximum pool Size setting to accommodate such bursts in processing.
- Expire timeout
- Number of milliseconds that an idle connection can remain in the pool before it is closed and
removed from the pool. The connection pool removes idle connections until the number of connections
in the pool is equal to the Minimum Pool Size. The timer for an idle
connection is reset when the connection is used.
- If you set the Expire timeout value too high, the connection pool might accumulate numerous unused and idle connections. It not only consumes local memory but also ties up a connection on your backend resource. This might have an adverse effect if your resource has a limited number of connections.
- If you set the Expire timeout value too low, the performance might degrade because of the increased activity of creating and closing connections. This Expire timeout must be tuned along with the Minimum Pool Size setting to avoid excessive opening and closing of connections during processing
-
Click Next. The Add account > Test and review page is displayed.
- Verify the account details.
- Click Test connection to verify the connection. A success message appears when the connectivity is successful.
- Click Enable. A success message is displayed.
- Click Done. You are redirected to the Connectors page and the newly created account appears in the Kafka drop-down list. You can use this account to run any Kafka custom action created under the same project.