rabbitmqproducer-consumereasynetq

EasyNetQ consuming behaviour and modular monolith


I'm new with EasyNetQ. Thinking about adopting this library into my project.

I have one question about consuming messages. Wiki states:

"As messages are received from queues subscribed to via EasyNetQ, they are placed on an in-memory queue. A single thread sits in a loop taking messages from the queue and calling their Action delegates. Since the delegates are processed one at a time on a single thread, you should avoid long-running synchronous IO operations. Return control from the delegate as soon as possible."

Is that mean that every received message can be handled in one application only one after another or is it by subsciption (subscriptionid/exchange/whatever)?

Why am I asking for this? My application is a modular monolith.

I looking for behaviour where each module consumes and handles messages completly independent (do not waits for others). Is that possible?

One long-processing handler will cause that no other handler can execute at that time?


Solution

  • I haven't worked on the project for a while but I think this is outdated, if you use the async consume methods it will use the standard task scheduler to process messages in parallel.