Stomp subscriber/listener , how to disconnect.

163 views
Skip to first unread message

Harshit rastogi

unread,
Oct 29, 2013, 1:13:30 PM10/29/13
to stomp...@googlegroups.com
Hi,

I am using cucumber to write test cases for our application and using stomp to read messages from the MQ. 

Since these are test cases , it may happen that broken test case may not be able to publish message to queue and in that case if the message is not receive may be within next 2-4 sec , i would like to disconnect the listener and fail it. 

my current code is 

client.subscribe('queue/pushQueue') do |msg|
 ##do some work
end

client.join

but the above code keeps on waiting until a message is received. How can i set the timeout ? 

Thanks
Harshit

 

gmallard

unread,
Oct 30, 2013, 1:56:24 PM10/30/13
to stomp...@googlegroups.com
Hi Harshit - Please post that as an issue in the stomp gem tracker:

https://github.com/stompgem/stomp/issues

Thanks, Guy
Reply all
Reply to author
Forward
0 new messages