Low level connection which maps commands and supports synchronous receives
| autoflush | [RW] | Autoflush forces a flush on each transmit. This may be changed dynamically by calling code. |
| autoflush | [RW] | Autoflush forces a flush on each transmit. This may be changed dynamically by calling code. |
| connection_frame | [R] | The CONNECTED frame from the broker. |
| connection_frame | [R] | The CONNECTED frame from the broker. |
| disconnect_receipt | [R] | Any disconnect RECEIPT frame if requested. |
| disconnect_receipt | [R] | Any disconnect RECEIPT frame if requested. |
| hb_received | [R] | Heartbeat receive has been on time. |
| hb_received | [R] | Heartbeat receive has been on time. |
| hb_sent | [R] | Heartbeat send has been successful. |
| hb_sent | [R] | Heartbeat send has been successful. |
| host | [R] | Currently-connected host and port |
| host | [R] | Currently-connected host and port |
| jruby | [R] | JRuby detected |
| jruby | [R] | JRuby detected |
| port | [R] | Currently-connected host and port |
| port | [R] | Currently-connected host and port |
| protocol | [R] | The Stomp Protocol version. |
| protocol | [R] | The Stomp Protocol version. |
| session | [R] | A unique session ID, assigned by the broker. |
| session | [R] | A unique session ID, assigned by the broker. |
A new Connection object can be initialized using two forms:
Hash (this is the recommended Connection initialization method):
hash = {
:hosts => [
{:login => "login1", :passcode => "passcode1", :host => "localhost", :port => 61616, :ssl => false},
{:login => "login2", :passcode => "passcode2", :host => "remotehost", :port => 61617, :ssl => false}
],
:reliable => true,
:initial_reconnect_delay => 0.01,
:max_reconnect_delay => 30.0,
:use_exponential_back_off => true,
:back_off_multiplier => 2,
:max_reconnect_attempts => 0,
:randomize => false,
:connect_timeout => 0,
:connect_headers => {},
:parse_timeout => 5,
:logger => nil,
:dmh => false,
:closed_check => true,
:hbser => false,
:stompconn => false,
:usecrlf => false,
:max_hbread_fails => 0,
:max_hbrlck_fails => 0,
:fast_hbs_adjust => 0.0,
:connread_timeout => 0,
:tcp_nodelay => true,
:start_timeout => 10,
}
e.g. c = Stomp::Connection.new(hash)
Positional parameters:
login (String, default : '')
passcode (String, default : '')
host (String, default : 'localhost')
port (Integer, default : 61613)
reliable (Boolean, default : false)
reconnect_delay (Integer, default : 5)
e.g. c = Stomp::Connection.new("username", "password", "localhost", 61613, true)
A new Connection object can be initialized using two forms:
Hash (this is the recommended Connection initialization method):
hash = {
:hosts => [
{:login => "login1", :passcode => "passcode1", :host => "localhost", :port => 61616, :ssl => false},
{:login => "login2", :passcode => "passcode2", :host => "remotehost", :port => 61617, :ssl => false}
],
:reliable => true,
:initial_reconnect_delay => 0.01,
:max_reconnect_delay => 30.0,
:use_exponential_back_off => true,
:back_off_multiplier => 2,
:max_reconnect_attempts => 0,
:randomize => false,
:connect_timeout => 0,
:connect_headers => {},
:parse_timeout => 5,
:logger => nil,
:dmh => false,
:closed_check => true,
:hbser => false,
:stompconn => false,
:usecrlf => false,
:max_hbread_fails => 0,
:max_hbrlck_fails => 0,
:fast_hbs_adjust => 0.0,
:connread_timeout => 0,
:tcp_nodelay => true,
:start_timeout => 10,
}
e.g. c = Stomp::Connection.new(hash)
Positional parameters:
login (String, default : '')
passcode (String, default : '')
host (String, default : 'localhost')
port (Integer, default : 61613)
reliable (Boolean, default : false)
reconnect_delay (Integer, default : 5)
e.g. c = Stomp::Connection.new("username", "password", "localhost", 61613, true)
open is syntactic sugar for ‘Connection.new’, see ‘initialize’ for usage.
open is syntactic sugar for ‘Connection.new’, see ‘initialize’ for usage.
Acknowledge a message, used when a subscription has specified client acknowledgement i.e. connection.subscribe("/queue/a", :ack => ‘client’). Accepts an optional transaction header ( :transaction => ‘some_transaction_id’ ) Behavior is protocol level dependent, see the specifications or comments below.
Acknowledge a message, used when a subscription has specified client acknowledgement i.e. connection.subscribe("/queue/a", :ack => ‘client’). Accepts an optional transaction header ( :transaction => ‘some_transaction_id’ ) Behavior is protocol level dependent, see the specifications or comments below.
disconnect closes this connection. If requested, a disconnect RECEIPT will be received.
disconnect closes this connection. If requested, a disconnect RECEIPT will be received.
hashed_initialize prepares a new connection with a Hash of initialization parameters.
hashed_initialize prepares a new connection with a Hash of initialization parameters.
Publish message to destination. To disable content length header use header ( :suppress_content_length => true ). Accepts a transaction header ( :transaction => ‘some_transaction_id’ ).
Publish message to destination. To disable content length header use header ( :suppress_content_length => true ). Accepts a transaction header ( :transaction => ‘some_transaction_id’ ).
Subscribe subscribes to a destination. A subscription name is required. For Stomp 1.1+ a session unique subscription ID is also required.
Subscribe subscribes to a destination. A subscription name is required. For Stomp 1.1+ a session unique subscription ID is also required.
Send a message back to the source or to the dead letter queue. Accepts a dead letter queue option ( :dead_letter_queue => "/queue/DLQ" ). Accepts a limit number of redeliveries option ( :max_redeliveries => 6 ). Accepts a force client acknowledgement option (:force_client_ack => true).
Send a message back to the source or to the dead letter queue. Accepts a dead letter queue option ( :dead_letter_queue => "/queue/DLQ" ). Accepts a limit number of redeliveries option ( :max_redeliveries => 6 ). Accepts a force client acknowledgement option (:force_client_ack => true).
Unsubscribe from a destination. A subscription name is required. For Stomp 1.1+ a session unique subscription ID is also required.
Unsubscribe from a destination. A subscription name is required. For Stomp 1.1+ a session unique subscription ID is also required.