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(...).