Low-code for Kafka
Purpose
Usage examples
Usage in a script/script task
api.events.v1.publishAsync(
"kafkaid", // name of the Kafka instance (configured by the administrator, lowercase only, no special characters)
"topicName", // name of the topic (configured by the administrator)
{ // message content – must be valid JSON
"id": "123",
"status": {
"code": "OK",
"message": "Everything is fine!"
},
"list": [1, 2, 3],
"boolean": true,
"date": new Date()
},
"key", // message key (optional – must be provided if you need to preserve event order)
{ // headers (optional)
"header1": "header1-value",
"header2": "header2-value"
}
);Important information
Last updated
Was this helpful?
