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's connection's host params should be exposed in the client. #74

Closed ismith closed 11 years ago

ismith commented 11 years ago

A Stomp::Client has attribute accessors for various host params (specifically, host, port, login, passcode, ssl), but in the current version, those attributes are always going to reflect the first host in the params hash (if the client was initialized from a params hash).

This change gets rid of those instance variables, and makes the corresponding methods delegate to the connection. Thus, if one host goes down and we failover to another, the client's :host, :port, etc, methods reflect the current state, instead of being unchanged.