How to post Kafka Avro records with httpclient

2020-04-06 Thread amruta dale
Hi Team, I have written my own Producer interceptor in Java for Kafka Producer. During intercepting I am trying to push avro message (record.value()) to one of the API via httpclient post method. I can send the simple messages to api however somehow for avro message I am unable to do so. Like w

Re: How to post Kafka Avro records with httpclient

2020-04-06 Thread Bernd Eckenfels
You post the serialized Avro message as a byte array (or other protocols like bas64 form fields or whatever the server expects). Text mode might not be the most efficient protocol to use. Greetings Bernd -- http://bernd.eckenfels.net Von: amruta dale Gesendet: M

Re: How to post Kafka Avro records with httpclient

2020-04-06 Thread amruta dale
Hi Bernd, Thanks for your revert. I am trying below but no luck. Can you please share any link as I have searched on web but didnt find nay good stuff around this. httpPost.setEntity (new byteArrayEntity ((byte[])record.value()) Regards, Amruta On Mon, Apr 6, 2020 at 3:47 PM Bernd Eckenfels wro