Configure Kafka
Use the service port type Kafka to connect to Apache Kafka topics and to push and pull messages. A Kafka topic stores records (messages) that are sent by one or more publishers and read by one or more consumers. One OSV service port represents one consumer of a Kafka topic. This means that you have to create one service port for each consumer.
For more information on Kafka topics and consumers, see chapter "Run Kafka messages".
Configure your service port
Once you have created your service port, you can configure the general service port details:
Attribute |
Description |
---|---|
General - Name |
Enter the name of the service port. |
General - Type |
Select your service port technology. |
Read / Write / Read & Write |
Select what your service port should do with messages:
|
Real Service |
Select if you want to connect to a real service. |
Allow OSV to forward requests to the real service. To use this option, you need to select Real Service. |
|
Allow OSV to store forwarded messages in the Recorder tab. To use this option, you need to enable Forwarding. |
|
Active |
Select if you want your service port to be active, deselect to set it to inactive. |
To connect to Kafka, specify the following attributes:
Attribute |
Description |
---|---|
Topic |
Enter the name of the topic you want to connect to. |
Host |
Enter the name or IP address of the host. |
Port |
Specify the port to access the broker. |
GroupId |
Enter the name of the consumer group that subscribed to this topic. |
Partition |
Specify the number of the partition. For example: 3. Kafka topics are split into multiple partitions that can be placed on different machines. This way, consumers can read them in parallel. |
Peeking |
Enable Peeking to retrieve records from the topic without consuming them. This allows you to read any record, regardless of its position and without influencing the offset. The offset defines the position of a record. It indicates which records have already been read by the consumer and which unread record OSV should pull next. |
Kafka service port
To save your changes, click Apply. To discard your changes, click Reset.