From 5b12f32edbc1ee30bf06af87f871770fbd33f564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Garc=C3=ADa=20Hern=C3=A1ndez?= Date: Thu, 10 Apr 2014 23:34:27 -0500 Subject: [PATCH] Fix nack method on frame object For the NACK method you must specify the destination queue instead of the subscription id. --- src/stomp.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stomp.coffee b/src/stomp.coffee index 13fb3c1..5be82b1 100644 --- a/src/stomp.coffee +++ b/src/stomp.coffee @@ -256,6 +256,7 @@ class Client # on the browser side (e.g. [RabbitMQ's temporary # queues](http://www.rabbitmq.com/stomp.html)). subscription = frame.headers.subscription + destination = frame.headers.destination onreceive = @subscriptions[subscription] or @onreceive if onreceive client = this @@ -265,7 +266,7 @@ class Client frame.ack = (headers = {}) => client .ack messageID , subscription, headers frame.nack = (headers = {}) => - client .nack messageID, subscription, headers + client .nack messageID, destination, headers onreceive frame else @debug? "Unhandled received MESSAGE: #{frame}"