One of our users reported that when using rabbitmq (3.9.5) + Node v20 + macOS it fails to connect.
When I tried to reproduce using this script:
const amqp = require('amqp-connection-manager');
// Create a connection manager
const connection = amqp.connect(['amqp://user:11cuJAQBH5sf9fad@rmq-rabbitmq'], {
heartbeatIntervalInSeconds: 30,
connectionOptions: {
noDelay: true,
timeout: 60,
keepAlive: true,
},
});
const QUEUE_NAME = 'amqp-connection-manager-sample2'
const EXCHANGE_NAME = 'amqp-connection-manager-sample2-ex';
// Handle an incomming message.
const onMessage = data => {
var message = JSON.parse(data.content.toString());
console.log("subscriber: got message", message);
channelWrapper.ack(data);
}
// Create a connetion manager
connection.on('connect', () => console.log('Connected!'));
connection.on('disconnect', err => console.log('Disconnected.', err.stack));
// Set up a channel listening for messages in the queue.
var channelWrapper = connection.createChannel({
setup: channel => {
// `channel` here is a regular amqplib `ConfirmChannel`.
return Promise.all([
channel.assertQueue(QUEUE_NAME, { exclusive: true, autoDelete: true }),
channel.assertExchange(EXCHANGE_NAME, 'topic'),
channel.prefetch(1),
channel.bindQueue(QUEUE_NAME, EXCHANGE_NAME, '#'),
channel.consume(QUEUE_NAME, onMessage)
])
}});
channelWrapper.waitForConnect()
.then(function() {
console.log("Listening for messages");
});
I saw that it's resolving DNS and not connecting. but when I run without mirrord, I can see it tries to connect - perhaps it's connecting in a way ignored by mirrord? :O
One of our users reported that when using rabbitmq (3.9.5) + Node v20 + macOS it fails to connect. When I tried to reproduce using this script:
I saw that it's resolving DNS and not connecting. but when I run without mirrord, I can see it tries to connect - perhaps it's connecting in a way ignored by mirrord? :O