Hi,
I use Quorum queues to enrure, that the queue and its message are durable and persistent, but emitting events on the publisher side still causes problems:
Let's assume I emit 1000 events each with a size of 1mb. This will result in an empty queue. Not a single event is received by RabbitMq, because it run into a heartbeat timeout.
To get rid of this problem, I tried to use the setTimeout() function and "activly" wait 10ms between each events. This approach works in my test setup, but in a real world scenario I couldn't trust, that 10ms are enough.
In the rabbitmq documentation I read about publisher confirms and how they work together with durable and persistents queue. This should fix my problem.
But I don't how to use this feature with a ClientProxy. I think I have to get the ampqlib instance and overwrite the emit / send methods.
Any ideas how to get the amqplib instance of a ClientProxy?
An example how to confirm queue works, can be found here: https://github.com/amqp-node/amqplib/blob/main/examples/waitForConfirms.js