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

When is it used? #4

Open
0xc9e36 opened this issue Aug 30, 2019 · 1 comment
Open

When is it used? #4

0xc9e36 opened this issue Aug 30, 2019 · 1 comment

Comments

@0xc9e36
Copy link

0xc9e36 commented Aug 30, 2019

Your code is great, but I don't know how to use it. Is there a real application scenario?

@vardius
Copy link
Owner

vardius commented Aug 30, 2019

The most simple example that comes to my mind would be using message-bus as an event bus with event sourcing patter.

Imagine having a large scale application containing a lot of components interacting with each other, and you want a way to make your components communicate while maintaining loose coupling and separation of concerns principles, the Event Bus pattern can be a good solution for your problem.
https://dzone.com/articles/design-patterns-event-bus

This is also how i use it https://github.com/vardius/go-api-boilerplate/tree/master/pkg/eventbus
for my api boilerplate

another example would be implementing pubsub service.

Let me know if this answers your question.

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

No branches or pull requests

2 participants