Hi ,
Acknowledging the message worked. Thanks for all the help.
Now the problems I faced seems trivial. If anyone is following this
thread, here is the updated code:
---- read.rb -----
#!/usr/bin/env ruby
require 'stomp'
client = Stomp::Connection.new("test","user")
client.subscribe "/queue/FOO.test"
while TRUE
puts "sleeping"
sleep 1
msg = client.receive
puts msg.body
client.ack msg
end
------------------
---- write.rb ------
#!/usr/bin/env ruby
require 'stomp'
client = Stomp::Connection.new("test","user")
for i in 0..10
sleep 1
client.send "/queue/FOO.test", "[Ruby] message " + i.to_s
puts "[Ruby] message " + i.to_s
end
client.disconnect
------------------
- Sandeep
> > However, the messages, once read , are still being retained in the
> > queue. Any suggestion on that one ? thanks.
>
> Sounds like you might want to acknowledge them maybe? There might be a
> bug with auto-ack in stomp possbly but you can always explicitly
> acknowledge a message when you are done with it.
>