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

1.4.5 gives me a ServerFrameNameError #153

Closed andy-twosticks closed 5 years ago

andy-twosticks commented 5 years ago

RabbitMQ, jRuby 1.9.17.0.

Under 1.4.5, messages are not passed to the RabbitMQ server, and instead I get:

Stomp::Error::ServerFrameNameError
CAUSE: NebulousStomp::ConnectionError: Stomp::Error::ServerFrameNameError

Note, I'm using Stomp via another gem, and right now I can't get you a full trace. But it's not an intermittent error for me. 1.4.5, always happens. 1.4.4, never happens.

Can someone tell me what this error means, BTW? I don't see it in your code.

gmallard commented 5 years ago

The code is in lib/connection/netio.rb, lines 67-70. If you do not see that .... I think you are looking at the wrong code.

It means that we are trying to read a frame from the wire. But the frame name we just read is not one of: CONNECTED, MESSAGE, RECEIPT, or ERROR. Those are the only frames a broker should ever send.

Do this for further diagnosis:

Before you start a test, do:

export DRDBG=true

Then recreate the error you see, and show me additional output.

gmallard commented 5 years ago

Apologies, I do not need further analysis from you.

I can recreate most of this here.

The gem at 1.4.5 is apparently broken badly with JRuby. This has nothing to do with RabbitMQ.

We will start to look at this in more detail.

Thanks for the heads up.

gmallard commented 5 years ago

OooooooK.

If you have ever looked closely at gem code you will notice a lot of checks for '@jruby'. To adjust code to allow for all the differences between JRuby and other Ruby implementations.

The 1.4.5 gem inadvertently broke some of the JRuby specific code. Do not use this gem version with JRuby!!

I will get 1.4.6 out in the next day or two with fix(es) for this mess.

Again, my apologies.

andy-twosticks commented 5 years ago

No apology necessary -- I'm aware that keeping your code working against multiple targets is difficult, and that's a really quick turnaround! Thank you!

gmallard commented 5 years ago

Gem version 1.4.6 is available on Rubygems. Lets try that.

JRuby tests were run with:

gmallard commented 5 years ago

I am going to close this as I believe that 1.4.6 fixes this issue.

If you disagree, please re-open with additional documentation.