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

Stomp Client no longer defaults port number in hash parameters. #99

Closed NeilW closed 10 years ago

NeilW commented 10 years ago

This is a regression from previous versions.

In previous versions you can supply a host array as

Stomp.client.new(:hosts =>[
  {:host=>"10.x.x.x", :login=>"bbcons", :passcode=>"<secret>"},
  {:host=>"10.x.x.x", :login=>"bbcons", :passcode=>"<secret>"}
])

and all is well.

In 1.3.2 this fails with an error:

/usr/lib/ruby/vendor_ruby/client/utils.rb:96:in `check_arguments!': ArgumentError (ArgumentError)
    from /usr/lib/ruby/vendor_ruby/stomp/client.rb:84:in `initialize'

It looks like the code fails to default the port number within hash_params as it did in previous versions.

The work around is to explicitly list the port number in the hash. I use:

:port => Stomp::Connection::default_port(false)
gmallard commented 10 years ago

Accepted.

Bisect tells me broken by: e459c7b552cc6a356b56b55f97d36adc522dad50

Regards, G.

gmallard commented 10 years ago

Closed, ref: 85ee2b5144fa14fb5dc2daa3332d07303e12b59e

This will be in the next release.