Tyk +kafka help needed

hi team, I need help to setup tyk gateway such that any request coming to my endpoint should generate kafka topic as well. E.g if I am posting payment initiation json to say http://IP_address:port/initiatePay/ {HDP sandbox on Azure}, tyk configuration should be such that it will post json to http://IP_address:port/initiatePay/ and also raise a kafka topic with same json. Could you please help me here with an working example? I am new to tyk.

Thank you!

Regards, Prasad

Hi Prassad,

I’m not sure how this would work with Tyk, there’'s no native MQ integration so you’d need to look at some JS middleware that might be able to do the call for you when a request arrives.

I’d start with this section of the docs:



hi Martin,

its a kafka Topic as a JSON request, not an JMS or MQ message?

Regards, Prasad

Hi Prasad,

In that case I would definetely look at using the JS middleware, all JS middleware get a copy of the request parameters, so you could very easily have it generate an HTTP request to your kafka system to generate the topic and have the JS only run on the initiatePay API.