

For instance, RabbitMQ, a messaging broker transport, is at a lower level than commercial products like Azure Service Bus, NServiceBus, MassTransit, or Brighter. But these technologies are at different levels. Using message brokers and services buses for production systemsĪs noted in the architecture section, you can choose from multiple messaging technologies for implementing your abstract event bus. There are multiple potential implementations, each using a different technology or infrastructure such as RabbitMQ, Azure Service Bus, or any other third-party open-source or commercial service bus. NET by using a generic event bus interface, as shown in Figure 6-18. This section describes how you can implement this type of communication with. Event-driven communication based on an event bus
#Masstransit python update
Figure 6-18 below, shows a PriceUpdated event published through an event bus, so the price update is propagated to the Basket and other microservices.įigure 6-18. At each action, the microservice updates a business entity and publishes an event that triggers the next action.
#Masstransit python series
An eventually consistent transaction consists of a series of distributed actions. You can use events to implement business transactions that span multiple services, which give you eventual consistency between those services. It can also have one or more implementations based on any inter-process or messaging communication, such as a messaging queue or a service bus that supports asynchronous communication and a publish/subscribe model. The event bus can be designed as an interface with the API needed to subscribe and unsubscribe to events and to publish events. This publish/subscribe system is usually performed by using an implementation of an event bus. This is the essence of the eventual consistency concept.


When a microservice receives an event, it can update its own business entities, which might lead to more events being published. Other microservices subscribe to those events. As described earlier, when you use event-based communication, a microservice publishes an event when something notable happens, such as when it updates a business entity.
