0xcodezero / activemessaging

Automatically exported from code.google.com/p/activemessaging
0 stars 0 forks source link

STOMP ignores configuration "reliable" #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure reliable: false in broker.yml
2. Stop your message bus
3. Try to publish a message

What is the expected output? What do you see instead?
Expected: No retries.
Actual output: connect to xxxx failed: Connection refused - connect(2) will
retry(#0) in 5

What version of the product are you using? On what operating system?
0.6.1

Suggested patch:

replace line 21 of lib/adapters/stomp.rb with:
cfg[:reliable] = true if cfg[:reliable].nil?

Original issue reported on code.google.com by maarten....@gmail.com on 20 Jan 2010 at 5:06

GoogleCodeExporter commented 9 years ago
Created a patch file for the suggested patch.

Original comment by maarten....@gmail.com on 28 Mar 2010 at 9:43

Attachments:

GoogleCodeExporter commented 9 years ago
this reliable/unreliable thing is an ugly vestigial bit of code.
I thin it was really for debugging - to make the poller die right away instead 
of
continuing to retry when tetsing out the config in development.  I think it 
would be
best to get rid of it. It's confusing, and I don't think necessary given the 
logging
will show any errors.

Original comment by kooks...@gmail.com on 29 Mar 2010 at 10:06

GoogleCodeExporter commented 9 years ago
Hmm, I think that any web requests that send out messages should be able to 
handle
the exception when the broker is down. Waiting a few seconds before retrying 
will
cause a cascading effect because all request handlers will be occupied for much 
too
long. Users are not willing to wait seconds for a request to be responded to 
and will
refresh the page.

Anyways, maybe the 'reliable' thingie should be implement more properly, but I 
still
think this fix should be applied so the reliable configuration parameter can 
actually
be used :-)

Original comment by maarten....@gmail.com on 29 Mar 2010 at 10:11