Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion Stomp Ruby gem on GitHub
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Elliot Nelson  
View profile  
 More options May 16 2008, 10:19 am
From: Elliot Nelson <nelson.w...@gmail.com>
Date: Fri, 16 May 2008 07:19:05 -0700 (PDT)
Local: Fri, May 16 2008 10:19 am
Subject: Re: Stomp Ruby gem on GitHub
One thing I would really like to see is low-level connection failover
within the Stomp gem itself.  In my current hacked-up copy of
stomp.rb, I'm accomplishing this by storing an array of connection
objects instead of host/port variables.  I then increment an index
into that array every time I try a reconnect within socket().

Basically, my socket() has an @hosts array and @host_index, and does
something like this:

  @host_index = (@host_index+1)%...@hosts.size
  host = @hosts[@host_index]
  begin
    s = TCPSocket.open host[:host], host[:port]
    _transmit(s, "CONNECT", {:login => host[:login], :passcode =>
host[:passcode]})
    ...

And I then open a "reliable with failover" connection using a method I
added:

Stomp::Connection.open_failover( [{:host => "host1"}, {:host =>
"host2", :port => 61007}] )

Ideally, if support for Stomp "URLs" was added to the gem, you could
pass something in similar to JMS's failover spec:

Stomp::Connection.open("failover:stomp://user:password@host1;stomp://
user:password@host2:61007")

If there's a better list for this discussion please let me know, I'm
very interested in seeing a robust Stomp failover just like JMS but I
haven't seen a good discussion group for the stomp gem itself.

Elliot


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.