0

I'm new to event driven architecture and have a very basic question about Microservices communication.

Given I have a website that has to make REST requests to an API Gateway. Say it does a fetch() to request some resource. How do I get a response or error in an event driven system?

Does Kafka accept rest requests and waits for a given event message from a service?

2 Answers 2

0

No, Kafka doesn't accept REST requests. It has a custom TCP protocol, not HTTP(S). You could use Kafka REST Proxy behind some API Gateway to solve this...

You track HTTP errors from the client, typically, unless the gateway has its own embedded metric collection.

Sign up to request clarification or add additional context in comments.

Comments

0

By default Kafka uses TCP. It does not have REST API endpoints.

However, for example, if created your Kafka cluster by Strimzi, you can use REST API by adding Kafka Bridge.

Here is an example using Strimzi Kafka Bridge.

enter image description here

Depending on how you created your Kafka cluster, you may find corresponding ways to expose REST API endpoints.

Reference: https://strimzi.io/docs/bridge/latest/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.