benjaminws / stomp-js

Implementation of the STOMP protocol in node.js
BSD 3-Clause "New" or "Revised" License
87 stars 47 forks source link

Producer Send return callback #49

Open mseld opened 7 years ago

mseld commented 7 years ago

Is there way to grantee that message send by returning callback

var client = new stomp.Stomp(stomp_args);
client.send(headers, true);

something like that

// callback
client.send(headers, true, function(err,reply) {
    if (err) {
        logger.error('[AMQ-producer] error : ' + err.message);
        logger.debug('[AMQ-producer] error stack : ' + err.stack);
    } else {
        logger.info(reply);
    }
});