I have this task created in my workflow:
"tasks": [
{
"name": "get_users_list",
"taskReferenceName": "get_users_list",
"inputParameters": {
"http_request": {
"uri": "https://reqres.in/api/users?page=${workflow.input.pagenumber}",
"method": "GET",
"contentType": "application/json",
"connectionTimeOut": "36000",
"readTimeOut": "36000"
}
},
"type": "HTTP",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
},
{
"name": "get_user_details",
"taskReferenceName": "get_user_details",
"inputParameters": {
"http_request": {
"uri": "https://reqres.in/api/users/${get_users_list.output.response.body.data[0].id}",
"method": "GET",
"contentType": "application/json",
"connectionTimeOut": "36000",
"readTimeOut": "36000"
}
},
"type": "HTTP",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
},
{
"name": "call_kafka",
"taskReferenceName": "call_kafka",
"inputParameters": {
"kafka_request": {
"topic": "transaction-1",
"value": "${get_user_details.output.response.body.data.first_name}",
"bootStrapServers": "kafka:9092"
},
"key": "",
"keySerializer": "org.apache.kafka.common.serialization.StringSerializer"
},
"type": "KAFKA_PUBLISH",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
}
],
When first two tasks are COMPLETED and the "call_kafka" task is getting failed with this error,
"Failed to invoke kafka task due to: org.apache.kafka.common.KafkaException: Failed to construct kafka producer"
I am new to Netflix Conductor and trying to publish a message to Kafka through workflow. Please correct me if anything wrong and suggest a solution for this issue. Thanks in advance
Kafka task has been moved to community repo. Please check: https://github.com/Netflix/conductor/discussions/2961
Resolved by: Adding the below dependency in
conductor/server/build.gradle
file:implementation
com.netflix.conductor:conductor-kafka:3.8.0