Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple outbound topics for publishing blockchain events #152

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

abhakish
Copy link
Contributor

With this change, based on configurations the block/chaincode events can now be sent to multiple topics.

}

for (String topic : optionalChaincodeDetails.get().getListenerTopics()) {
sendMessage(topic, payload, chaincodeName, fabricTxId, eventName, channelName, messageKey);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does all these topics rely on the same Kafka Template? What if they belong to different outbound brokers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All topics rely on the same kafka template. We can provide multiple brokers in brokerHost field in application.yml in comma separated manner

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated code to create multiple producers and using RoutingKafkaTemplate to dispatch message based on topic name configured while creating producer factory

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