How to send message in AVRO format from SN to Kafka using stream connect and 'Producer' step in flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 06:22 AM
Hi experts,
We need to send message (data) from SN to client side Kafka topic using stream connect subscription. the data should be in AVRO format with the help a flow having 'Producer' step in it.
Can someone please help me how to configure the 'Producer' step in action of the flow to send ServiceNow record/s in AVRO format data to third party Kafka topic?
I really appreciate any urgent help. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 06:33 AM
Hello @Animesh Das2 ,
first make sure to define AVRO schema in the Schema Management section of Stream connect. This schema must match the structure of the message you want to send.
Below is sample example of AVRO schema for a user record
{
"type": "record",
"name": "User",
"namespace": "com.example",
"fields": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "email",
"type": ["null", "string"],
"default": null
},
{
"name": "age",
"type": ["null", "int"],
"default": null
},
{
"name": "is_active",
"type": "boolean",
"default": true
}
]
}
Then in the producer step add the message and Schema according.
Message - Construct the message using data pills or JSON. This must match the AVRO schema.
Schema- Select the schema you created in Stream Connect.
Regards,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 06:45 AM - edited 07-28-2025 06:55 AM
Thanks @Omkar Kumbhar ,
We did that but still the third party Kafka is getting the data corrupted. By the way what does the, "namespace": "com.example", signify and what value it should hold? Is it mandatory to put? Although we have put that in the schema anyways.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 06:51 AM
@Animesh Das2 namespace is like a package name. it helps uniquely identify the schema. It is optional! Can you share few screenshots about the data corrupted?