Hello,
I’m used to RabbitMQ / AMQP 0-9-1. Clients with the right credentials can assert queues into existence and bind them to multiple topic bindings. Clients can specify if queues are durable etc. It’s quite convenient.
I’m trying to get the same thing working in Solace via AMQP 1.0. Sorry but I’m not super familiar with the 1.0 protocol.
I’m using NodeJS and I decided to use the
GitHub - amqp/rhea: A reactive messaging library based on the AMQP protocol
A reactive messaging library based on the AMQP protocol - GitHub - amqp/rhea: A reactive messaging library based on the AMQP protocol library instead of the one linked in solace docs. The amqp10 nodejs package has almost zero activity and no downloads so I went with rhea.
Here’s some simple code I’m working with:
const container = require (‘rhea’);
const connection = container. connect ({
host: ‘xxx.messaging.solace.cloud’,
port: 5671,
username: ‘solace-cloud-client’,
password: ‘xxx’,
transport: ‘tls’
});
container. on (‘message’, function (context) {
console. log (context.message=${JSON. stringify (context.message)}
);
});
const reciever = connection. open_receiver ({
name: test-amqp-one
,
source: { address: ‘topic://hooray/*/>’, durable: 2, expiry_policy: ‘never’, capabilities: [‘topic’] }
});
I can publish messages to the topic /hooray/a/b and I see messages flow to my simple consumer. But they come through via a “Topic Endpoint”. This is bad because I want a durable subscription. If my consumer node app is down and I publish messages they are lost to the consumer.
How can I open an AMQP 1.0 receiver that will bind to a topic and create (if it doesn’t exist) a durable queue like I can with Rabbit?
Thanks for the help