How to delete a topic or queue using MQ Light in Bluemix?

When using the MQ Light service on Bluemix, is there an API for deleting a topic / queue using MQLight? Or mark the topic / queue for automatic deletion?

+4
source share
1 answer

When creating a subscription, you can specify the "TTL" lifetime. If the lifetime is counted to zero, MQ Light deletes the destination, discarding any messages stored at the destination, and does not type any new messages.

The default value for this property is 0- this means that the destination will be deleted as soon as clients are not subscribed to it.

Node.js API . IBM MQ Light Client Module. TTL:

API client.subscribe(...):

client.subscribe("my/replies", "shareGroup1", 
    { ttl: 300000, qos: mqlight.QOS_AT_LEAST_ONCE, autoConfirm: true },
    msgArrivedCallback);

:

var options = {
   ttl: 60000 ,
   qos: 1,
   credit: 1,
   autoConfirm: false
};

, client.send(...) client.unsubscribe(...).

+4

Source: https://habr.com/ru/post/1583823/


All Articles