Skip to content
This repository was archived by the owner on Nov 28, 2018. It is now read-only.

Commit d8d7527

Browse files
committed
add nack support copied from xFragger/stomp-js
1 parent e7af174 commit d8d7527

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/stomp.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,18 @@ Stomp.prototype.ack = function(message_id) {
400400
this.log.debug('acknowledged message: ' + message_id);
401401
};
402402

403+
//
404+
// ## Stomp.nack(message_id)
405+
//
406+
// **Deny received message**
407+
//
408+
// Takes a string representing the message id to nack
409+
//
410+
Stomp.prototype.nack = function(message_id) {
411+
send_command(this, 'NACK', {'message-id': message_id});
412+
this.log.debug('denied message: ' + message_id);
413+
};
414+
403415
//
404416
// ## Stomp.begin()
405417
//

0 commit comments

Comments
 (0)