Ends in:
7 DAYS
10 HRS
25 MIN
24 SEC
Ends in:
7 D
10 H
25 M
24 S
Open Closed

Distributed Event Bus - RabbitMQ concurrency #5853


User avatar
0
DominaTang created
  • ABP Framework version: v7.2.1
  • UI Type: Angular
  • Database System: EF Core / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

With Micro-Service architecture which the distributed event bus is implemented by RabbitMQ. I have the following questions:

  1. If several messages published to the event bus in a short period, would the event handling process all the messages without loosing any message when doesn't use the Outbox?
  2. When backend APIs are deployed as several instances, and a message is published to the event bus, all the API instances pickup the same message or only one of the API instance will pick up the message.
  3. When should use outbox when shouldn't use outbox?

3 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi

    If several messages published to the event bus in a short period, would the event handling process all the messages without loosing any message when doesn't use the Outbox? Please read more about RabbitMQ Reliability https://www.rabbitmq.com/reliability.html

    Hi All the API instances will listen to those message but they have to be configure on the same channel https://github.com/abpframework/abp-samples/tree/master/RabbitMqEventBus You can try this easy sample

    you can read https://docs.abp.io/en/abp/latest/Distributed-Event-Bus#outbox-inbox-for-transactional-events more about When should use outbox when shouldn't use outbox?

  • User Avatar
    0
    DominaTang created

    Hi

    If several messages published to the event bus in a short period, would the event handling process all the messages without loosing any message when doesn't use the Outbox? Please read more about RabbitMQ Reliability https://www.rabbitmq.com/reliability.html

    Hi All the API instances will listen to those message but they have to be configure on the same channel https://github.com/abpframework/abp-samples/tree/master/RabbitMqEventBus You can try this easy sample

    you can read https://docs.abp.io/en/abp/latest/Distributed-Event-Bus#outbox-inbox-for-transactional-events more about When should use outbox when shouldn't use outbox?

    For item2 I means this page: https://docs.abp.io/en/abp/latest/Distributed-Event-Bus Pre-requirements The outbox/inbox system uses the distributed lock system to handle concurrency when you run multiple instances of your application/service. So, you should configure the distributed lock system with one of the providers as explained in this document. The outbox/inbox system supports Entity Framework Core (EF Core) and MongoDB database providers out of the box. So, your applications should use one of these database providers. For other database providers, see the Implementing a Custom Database Provider section.

    We do have Multiple instances of microservices, what does configure 'distributed lock system' means?

  • User Avatar
    0
    jfistelmann created

    Hey,

    it's all explained in the documentation to which the "as explained in this document" link points: https://docs.abp.io/en/abp/latest/Distributed-Locking

    Distributed locking is a technique to manage many applications that try to access the same resource. The main purpose is to allow only one of many applications to access the same resource at the same time. Otherwise, accessing the same object from various applications may corrupt the value of the resources.
    

    Can you explain what's unclear?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06