Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tRESTREST API of KAFKA giving error

Hello,

I have Kafka REST API working fine on my Linux distro. I am able to write message to the queue using the curl command. However I would like to replicate the writing to the queue in Talend.

 

I have been trying various options to write to the queue without any success. I have tried tREST, tRESTclient but couldn't achieve.

 

Below is the curl command I have tried which works fine.

 

curl -X POST -H "Content-Type: application/vnd.kafka.json.v2+json" --data '{"records":[{"value":{"name": "testUser"}}]}' "http://localhost:8082/topics/test"

 

This works fine.

I have screen shot of the job I created. I have tried to create a job in many ways.

 

I am not sure if the job is correct or it should be done in different way. Please help.

 

Thanks,

As

Labels (3)
2 Replies
Anonymous
Not applicable
Author

Hi
tRestClient requires a Document as request parameter, you need to use a tXMLMap before tRestClient to generate a Document. Have a try to use tRest component if you want to pass the data body as string.

Regards
Shong
Anonymous
Not applicable
Author

Hi, I am already getting the input as document. Actually I am using Talend ESB which has webservice component to receive messages over SOAP. This message is passed to the RestClient to invoke rest action but it fails giving rest error 500.

 

Thanks 

Az