stompgem / stomp

A ruby gem for sending and receiving messages from a Stomp protocol compliant message queue. Includes: failover logic, ssl support.
http://stomp.github.com
Apache License 2.0
152 stars 80 forks source link

subId not set correctly on Stomp::Connection#unsubscribe #56

Closed soupmatt closed 11 years ago

soupmatt commented 11 years ago

When I call connection.unsubscribe("/queue/my_queue", {}, "my_sub"), "my_sub" is not passed to server in the id header. I believe the error is that it should be set right after the check for the presence of the subId, which is here: https://github.com/stompgem/stomp/blob/master/lib/stomp/connection.rb#L272.

The value is set correctly when calling subscribe, here: https://github.com/stompgem/stomp/blob/master/lib/stomp/connection.rb#L248

gmallard commented 11 years ago

Thanks for the report, good catch, will get that fixed.

If you are using ActiveMQ, you should consider filing an issue with them. I think they should ship an ERROR frame back for that, and they currently do not. Both Apollo and RabbitMQ give me "reasonable" ERROR frames in return.

soupmatt commented 11 years ago

I was using rabbitmq and getting the ERROR frame.

On Apr 11, 2013, at 7:30 AM, "Guy M. Allard" notifications@github.com wrote:

Thanks for the report, good catch, will get that fixed.

If you are using ActiveMQ, you should consider filing an issue with them. I think they should ship an ERROR frame back for that, and they currently do not. Both Apollo and RabbitMQ give me "reasonable" ERROR frames in return.

— Reply to this email directly or view it on GitHub.

gmallard commented 11 years ago

Closed, will be in next version. See: cb0f756