Skip to content

Conversation

mightycox
Copy link
Contributor

No description provided.

this.connection = con;
eventHandlers.forEach(handler -> {
this.handlerMap.put(handler.getTopicToSubscribe(), handler);
this.subscribeForSAGA(handler.getTopicToSubscribe(), handler);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see some redundant codes in this class.
handlerMap is to handle multiple subscribers. I think subscribe() method below could be enhanced to use handlerMap so that onMessage could handle messages from multiple topics instead of having the separate onMessageForSAGA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants