Does createDurableQueueDestination() method in solClientFactory creates durable queue if not exist in producer flow?
var message = solace.SolclientFactory.createMessage();
message.setDestination(solace.SolclientFactory.createDurableQueueDestination(producer.queueName));
message.setBinaryAttachment(messageText);
message.setDeliveryMode(solace.MessageDeliveryModeType.PERSISTENT);‘’’
nodejs package - solclientjs
Solace pubsub broker version - 10.1.1.29
Hi @prashantk2000 - No, it doesn’t; It simply sets the destination on the message.
Queues are lifecycle-managed resources and must be created on a connected session via a createMessageConsumer > call.
Here a queue can be created if found missing
subscriber.messageSubscriber = subscriber.session.createMessageConsumer({
// solace.MessageConsumerProperties
queueDescriptor: { name: consumer.queueName, type: solace.QueueType.QUEUE },
acknowledgeMode: solace.MessageConsumerAcknowledgeMode.CLIENT,
createIfMissing: true,
});
Thanks @giri
Yes I see the same behavior in producer flow. Initially I thought SolclientFactory. createDurableQueueDestination( String queueName ) will create durable queue but it only creates destination instance and not the durable queue. PubSub+ JavaScript API Documentation