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

Received message is nil, and connection not reliable #109

Closed ariefk closed 8 years ago

ariefk commented 9 years ago

I got an error message: warning: broker sent EOF, and connection not reliable /usr/share/ruby-rvm/gems/ruby-1.9.3-p448/gems/stomp-1.3.2/lib/client/utils.rb:165:in block (2 levels) in start_listeners': Received message is nil, and connection not reliable (Stomp::Error::NilMessageError) from /usr/share/ruby-rvm/gems/ruby-1.9.3-p448/gems/stomp-1.3.2/lib/client/utils.rb:161:inloop' from /usr/share/ruby-rvm/gems/ruby-1.9.3-p448/gems/stomp-1.3.2/lib/client/utils.rb:161:in `block in start_listeners'

Any suggestions?

Regards,

Arief K

gmallard commented 9 years ago

What is in your broker logs when this occurs?

Sounds to me like a problem on the broker side.

If it can be recreated, please post code that does that.

And provide broker details (name, level).

gmallard commented 8 years ago

Can you reliably recreate this? If so, how?

gmallard commented 8 years ago

I did some more research on this because it sounded very familiar.

All of the discussion around what you see can be found in Issue #50 and Issue #58.

In your case, the connection is being severed in any case and there will be no retries because you have :reliable => false. So the nil message is not important: your connection is already dead.

I am going to guess that you are not using a 'hash' to connect (which is the recommended connection method). You have two choices:

I am closing this, because it is 'working as designed'.

Also: upgrade the gem. Current version is 1.4.1, and will function in a Ruby 1.9.3 environment.