Lowcode to Kafka
Purpose
Usage examples
Use in a script/script task
try {
api.events.v1.publishAsync(
"kafkaid", // Kafka instance name (configured by the administrator, written only in lowercase, without special characters)
"topicName", // topic name (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 – it should be set if we need to preserve the order of events)
{ // headers (optional)
"header1": "header1-value",
"header2": "header2-value"
}
);
} catch (e) {
// error handling
}Important information
Last updated
Was this helpful?
