Magendran V
Magendran V

Reputation: 1417

How to handle messages as Job set in RabbitMQ?

I am new to RabbitMQ, I have tried RabbitMQ samples using the tutorials https://www.rabbitmq.com/getstarted.html.

Could anyone please explain about to how to publish messages as set instead of single message at a time. Also how to subscribe message from Queue as a set instead of single message at a time.

Meaning that, how can we achieve publish and consume queue messages as Job set in RabbitMQ?

Thanks in advance.

Upvotes: 0

Views: 133

Answers (1)

Vor
Vor

Reputation: 35149

There is no way to achieve what you described without writing your own logic.

By your own logic I mean few options:

  1. Modify producer to package "jobs" into a single message
  2. Create a "special" consumer that will bundle messages together and push them to the right exchange.
  3. Use prefetch count on consumer side with some logic that would take care of aggregating messages together.

Upvotes: 1

Related Questions