Can we move RMQ messages in batches to another RMQ using shovel(dynamic)?

118 Views Asked by At

I wrote a script which uses RMQ shovel's PUT api to move messages to another RMQ but I was wondering about how it works internally. Does it move all the messages instantaneously? If yes, can we move it in batches for optimising it?

1

There are 1 best solutions below

0
DavidL On

From the documentation:

A shovel behaves like a well-written client application, which connects to its source and destination, consumes and republishes messages, and uses acknowledgements on both ends to cope with failures.

What Does a Shovel Do? In essence, a shovel is a minimalistic message pump. Each shovel:

  • Connects to the source and destination clusters
  • Consumes messages from a queue
  • Re-publishes to a destination
  • Uses data safety features on both ends and handles failures

Rabbitmq publishers can handle batch of messages depending on your acknowledgement strategy (see Publisher Acknowledgements and Data Safety).

If you want more control on the publisher behaviour, you should create your own and not use the shovel plugin.