Hello Everyone,
I am trying to receive a Kafka message and forward it to the next REST call later. Though, I can see that the Kafka connector is getting the msg but some how the variables that I am setting in “Result Expression” are not showing up in the next REST Connector or in the Operate console.
I can’t upload images or BPMN file, since its company laptop. Bit of imagination required.
So in Kafka connector’s Output mapping → Result Variable section I have declared “response” as Result Variable Name and in Result Expression, I have something like below.
{
customername:value.customername,
dob:value.dob,
mobilenumber: value.mobilenumber,
emailid: value.emailid,
postcode: value.postcode
}
In the next REST Outbound Connector, I declared Request Payload something like below.
{
"customername" : customername,
"dob" : dob,
"mobilenumber" : mobilenumber,
"emailid" : emailid,
"postcode" : postcode
}
In Operate window, I do see incoming msg to Kafka connector like below.
{
"rawValue":"{ customername='John Doe', dob='1990-05-15', mobilenumber='1234567890', emailid='john.doe@example.com', postcode='12345'}",
"value":"{ customername='John Doe', dob='1990-05-15', mobilenumber='1234567890', emailid='john.doe@example.com', postcode='12345'}"
}
But when my REST Endpoint (SpringBoot Code) is receiving JSON, all the attributes are null
What am I doing wrong?
Can anyone please help!!
Regards,
Jaikrat