-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nack method on frame object #62
base: master
Are you sure you want to change the base?
Conversation
For the NACK method you must specify the destination queue instead of the subscription id.
Yes, I did, I had problems sending the NACK, the server indicated that it was consumed. However, by modifying the parameter using destination rather than subscription, if I receive the message and the server marks it as pending message, and the message remains in the queue. Server: Apache ActiveMQ 5.7.0 var url = "ws://localhost:61614/"; var connectCallback = function() { client.connect({}, connectCallback); |
For an ACK must be sent subscriber identifier, but for an NACK must be sent the name of the queue. Both in the same 'subscription' parameter of the 'header' object. |
ACK and NACK frame format has changed between STOMP 1.1 (that is used by your version of ActiveMQ) and STOMP 1.2 (supported in the latest version). In STOMP 1.1, NACK must have a In STOMP 1.2, stomp.js code is not correct for both STOMP 1.2 and STOMP 1.1. In any case, the |
Could you try your application with https://github.com/jmesnil/stomp-websocket/blob/stomp_1.1_ack/lib/stomp.js ? With this commit (8538106) I have verified that ack & nack frames are working with both STOMP 1.1 and 1.2 with ActiveMQ 5.9.0. |
Still not working, and the frame object is to acknowledge is: |
I'm digging up an old one here but @jmesnil or @chepike did you ever get further with this? I'm on ActiveMQ 5.9.0 and I am having similar issues to others. I've tried the 8538106 commit and replaced stomp.js from v2.3.3 to no avail. Below is a snippet of my code - basically it subscribes, successfully gets a message and non-acknowledges all messages, but the message does not stay on the queue. https://gist.github.com/timgriffin/f541366082e88c52947a121145a8f951 I am connecting over TCP if that makes a difference (var client = Stomp.overTCP(....)). Any help would be appreciated! |
For the NACK method you must specify the destination queue instead of
the subscription id.