Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Producer- Scoped (deprecated)

The Producer API provides methods that enable you to push data from a ServiceNow instance to a Kafka topic.

Note: This API is deprecated and replaced by the ProducerV2 - Scoped API.

This API requires the ServiceNow Integration Hub Action Step - Kafka Producer plugin (com.glide.hub.action_step.kafka) and is provided within the sn_ih_kafka namespace.

Parent Topic:Server API reference

Producer - send(String topic, String key, String message, Boolean isSync)

Sends the specified message to the specified Kafka topic.

NameTypeDescription
topicStringName 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. When you enter the topic name, include everything that comes after the instance name prefix. For example, if the complete topic name is `snc..sn_streamconnect.`, enter `sn_streamconnect.` in the topic field.
keyStringName 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.
messageStringMessage text.
isSyncBooleanFlag that indicates whether to require the flow to wait for the step to complete before continuing.Valid values: - true: Wait for the step to complete before continuing the associated flow. - false: Do not wait for the step to complete before continuing the associated flow.
TypeDescription
None 

This example shows how to send changed incident information to the changed_incidents Kafka topic.

var message = {
  'number': current.number.toString(),
  'short_description': current.short_description.toString(),
  'caller_id': current.caller_id.getDisplayValue(),
  'priority': current.priority.toString(),
  'state': current.state.toString()
};

var producer = new sn_ih_kafka.Producer();
producer.send('changed_incidents', current.number.toString(), JSON.stringify(message), false);

sndocs is an independent community mirror and is not affiliated with or endorsed by ServiceNow.

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

© 2026 ServiceNow, Inc. All rights reserved.

Documentation content is redistributed under the Apache License 2.0 from the ServiceNowDocs repository.