Create an action that publishes events to a topic in your Kafka environment.

Roles and availability

The Kafka Producer step is an Workflow Studio action step. Users with the action_designer role can create a custom action with one or more action steps.

This step is requires a Stream Connect subscription. For more information, see https://www.servicenow.com/now-platform/workflow-data-fabric.html.

This step requires the ServiceNow Stream Connect Installer [com.glide.hub.stream_connect.installer] plugin.

Fields

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.

Example Kafka Producer step.

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