I am writing some code to listen to events from Kafka (in Java). Here's the design:
- A central controller that listens to events from a particular topic.
- Based on the message type, invoke an appropriate controller.
- The controller in turn invokes its handler to perform the appropriate action.
What would be the ideal design pattern that I can use for the above scenario? I tried using the visitor pattern. Is it the right choice here?
Aucun commentaire:
Enregistrer un commentaire