Kafka Producer step
Summarize
Summary of Kafka Producer Step
The Kafka Producer step allows users to create an action that publishes events to a designated topic within a Kafka environment. It is part of the Action Designer and requires users to have the actiondesigner role and a Stream Connect for Apache Kafka subscription.
Show less
Key Features
- Topic: Specifies the topic to which messages are published; topics store messages of the same type.
- Message: The content of the message being sent.
- Key: Identifies the partition for message storage; messages with the same key are stored together.
- Headers: Allows for name-value pairs to be added to the message.
- Wait For Completion: Option to pause the flow until the Kafka step completes.
- Failure Handling: Options for managing step failures, including stopping the action or continuing to the next step.
Key Outcomes
This step enables effective message publication to Kafka topics, facilitating real-time data processing. Users can expect to handle message errors efficiently and track runtime details through the Step Status, which indicates success or error codes and provides relevant messages for troubleshooting.
Create an action that publishes events to a topic in your Kafka environment.
Roles and availability
The Kafka Producer step is an Action Designer action step. Users with the action_designer role can create a custom action with one or more action steps.
This step requires a Stream Connect subscription. For more information, see https://www.servicenow.com/products/automation-engine.html.
This step requires the ServiceNow IntegrationHub Action Step - Kafka Producer [com.glide.hub.action_step.kafka] plugin.
Fields
| Field | Description |
|---|---|
| Topic | Name of the topic to publish the message to. A topic stores messages of the same type. For example, a topic named Payments might store messages about recent payments. Select a topic from the drop-down list. |
| Message | Text of the message. |
| Key | Name of the key for a specific partition. Topics can be partitioned. Messages with the same key are stored in the same partition. For example, payment messages with a key of June would all be stored in the same partition of the Payments topic. |
| Headers | Headers for the message, in name-value pairs. For both the Name and Value fields, you can enter a value or use a data pill. |
| Wait For Completion | Option to require the flow to wait for the step to complete before continuing. |
| If this step fails | Option to go to error evaluation or continue running the next step. This
option has no effect on the Step Status. Select one of the following.
|
Example
In this example, the step sends a message recording the creation of an incident. The message includes an incident identifier, a description, and a message header. The message is sent to the incidents topic, and stored in the partition with the name of the incident identifier.
Outputs
| Field | Description | Data Type |
|---|---|---|
| Step Status | Object data pill containing runtime details about the step. Each step in an action returns a Step Status. | Object |
| Step Status > Code | Integer data pill indicating whether the step produced an error. By default, a value of 1 indicates that the step produced an error. A value of 0 indicates that the step ran successfully. You can't customize these codes. | Integer |
| Step Status > Message | String data pill containing the error message produced by the step or system operation. You can't customize this message. | String |