Hi @cressie176,
I am trying to test the reconnection part of Rascal. When shutting down RabbitMQ, I see the reconnection code working, using the DEBUG mode for Rascal. I see some instances of Heartbet timeout coming up from the amqplib, like:
at Heart.emit (events.js:198:13)',\n ' at Heart.EventEmitter.emit (domain.js:448:20)',\n ' at Heart.runHeartbeat (/Users/carlosgarcia/Documents/mailonline/development/mol-fe/mol-fe-web-push-api/node_modules/amqplib/lib/heartbeat.js:88:17)',\n ' at ontimeout (timers.js:436:11)',\n ' at tryOnTimeout (timers.js:300:5)',\n ' at listOnTimeout (timers.js:263:5)',\n ' at Timer.processTimers (timers.js:223:10)' ]
I have two applications, one producer and one consumer, using the same broker, and while the producer is able to publish messages after the reconnection, the consumer is not able to consume messages even though it seems that is has reconnected and re-established the subscriptions.
I see uncaught exceptions for the hearbeat and unexpected close errors. How should I handle those? I have .on('error') listeners in all the places mentioned in the documentation, when creating the broker and for the subscription and the publication. We use the promise version.
I can see this in the DEBUG rascal logs on the consumer application
rascal:Vhost Initialising vhost: my-host-name rascal:tasks:createConnection Connecting to broker using url: amqp://admin:***@localhost:5673/web-push-api?heartbeat=10&connection_timeout=10000&channelMax=100 rascal:tasks:createConnection Obtained connection: my-connection-hash rascal:tasks:createChannel Creating channel rascal:tasks:assertExchanges Asserting exchange: my-exchange rascal:tasks:assertQueues Asserting queue: subscription rascal:tasks:applyBindings Binding queue: subscription to exchange: my-exchange with binding key: my-binding-key rascal:tasks:closeChannel Closing channel rascal:Vhost vhost: my-host-name was initialised with connection: my-connection-hash
Is normal that it closes the channel?
Checking the RabbitMQ UI Management, it seems the consumer doesn't get attached to the queue.
Please, let me know if you need any more info from my side.
Thanks a lot.