Code Monkey home page Code Monkey logo

Comments (2)

kevinding0218 avatar kevinding0218 commented on May 21, 2024 1

Thank you very much Edwin! This makes perfect sense to me!

from pitstop.

EdwinVW avatar EdwinVW commented on May 21, 2024

Hello @kevinding0218, thanks for interest in this project! I hopye you will learn from it.

About your questions:

  1. The topic param in the comments is not supposed to be there. I have removed it from the code. It was a leftover from an earlier version and I forgot to removed it after I refactored the code.
  2. I use a fanout Exchange to do pub-sub. The idea is that every event might be interesting for every consumer. Using fanout, every consumer can define a queue and bind it to the Exchange. This way the sender is unaware of its' consumers, which reduces coupling. Whether this is the right way to distribute your events, totally depends on the situation. For Pitstop there are not many consumers and we control everything in the solution. In a more enterprise-like environment with multiple teams and more consumers, it might be better to distribute your messaging load differently (either using multiple Exchanges, or routing-keys (which I support in the Messaging library) or ...). So I use it like this, but don't assume this is the only way to do messaging.

I hope this makes sense and I've answered your questions.

from pitstop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.