I want to use Kafka for sending messages between microservices.
Kafka uses publish subscribe mechanism, that it is mean, a producer produces messages, kafka receives it and subscribes to consumers. Consumers always listen to an events for incoming messages and react accordingly.
My question is, how to build a system with functional programming language(scala, haskell), for listening incoming events?
It is like a http server, that is listening for incoming requests.
I think, it needs an IO Monad because of the side effects, that is going the happen.
And how to keep it always running? With a simple look?