In my nodejs based application I am trying to connect solace broker using amqps protocol and package I am using is **amqp10 ** however I am unable to connect it. As per the doc I am creating the uri as 'amqps://default:access_token@broker-host:5671?amqp.saslMechanisms=XOAUTH2'.
But this is not working. Any suggestions? Please share if any sample is available. Is there any alternative?
let uri = "amqps://default:" + token.access_token + "@svc-solace-broker:5671?amqp.saslMechanisms=XOAUTH2";
amqpClient.connect(uri).then(() => {
// create a sender to the queue
return amqpClient.createSender(self.queueName);
}).then((amqpSender) => {
self.log(`Sending message '${message}'...`);
return amqpSender.send(message).then(() => {
self.log('Message sent successfully.');
self.exit();
}, (error) => {
self.error(error);
});
});