---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Producer - Scoped (deprecated)

# Producer - Scoped (deprecated) {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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](https://servicenow-prod.fluidtopics.net/oN6H2yQdBDXzIu5PYXTDbw#ProducerV2ScopedAPI "The ProducerV2 API provides methods to publish messages from your ServiceNow instance to a Kafka topic.") 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.

## Producer - send(String topic, String key, String message, Boolean isSync) {#ariaid-title2}

Sends the specified message to the specified Kafka topic.
{#Producer-send-S_S_S_B__table_scd_fzf_mrb__entry__3}

| Name | Type | Description |
|-|-|-|
| topic | String | 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. When you enter the topic name, include everything that comes after the instance name prefix. For example, if the complete topic name is `snc.<instancename>.sn_streamconnect.<topicname>`, enter `sn_streamconnect.<topicname>` in the topic field. |
| key | String | 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. |
| message | String | Message text. |
| isSync | Boolean | Flag 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. |
[Table 1. Parameters]

{#Producer-send-S_S_S_B__table_scd_fzf_mrb} {#Producer-send-S_S_S_B__table_tcd_fzf_mrb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 2. Returns]

{#Producer-send-S_S_S_B__table_tcd_fzf_mrb}  
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);


