views:

197

answers:

4

Hi all,

I have AMQ + Activemessaging running in a Rails App.

I'm facing a problem with activemessaging not acting on messages when they are received. This is solved once i restart the client. Apparently, it works for a while but not sure when it stops acting weirdly.

This is resulting in loss of messages as they are being read, the Stomp client is configured with :ack => true acknowledges the reception of the message, yet, none of the data is available when the message is sent.

Is anyone facing a similar problem or using an alternative for Activemessaging?

Do you have a working scenario using AMQ + Ruby?

Cheers,

+1  A: 

try :ack=>'client' or :ack=>'auto' instead.

:ack=>true is not a valid config, don't know what that will do - nothing good.

Valid options are 'client' and 'auto' (auto is the default, client makes sure the client acks each message one at a time, and is never sent another message until the last was ack'd).

See here for how ack options work in stomp: http://stomp.codehaus.org/Protocol

Cheers,

-Andrew Kuklewicz

Andrew Kuklewicz
Thanks Andrew,The settings you mentioned are the ones i am using: {:ack=>'client'}By TRUE i meant that it is enabled.Still, the poller script needs restarting every now and then so that the queue is read properly.One thing to note also, is that Rails default logger is not accessible in production mode, works perfectly in development.I'm using Rails 2.1.2
cnicolaou
To all ActiveMessaging users:After spending ages trying to figure out the problem and trying different scenarios and work arounds, the problem turned out to be MySQL connection was timing out.For some reason, the connection was not re-established when messages appear in the queue.Anybody faces a similar situation and what was the solution to it.Cheers,Constantine Nicolaou
cnicolaou
A: 

To all ActiveMessaging users: After spending ages trying to figure out the problem and trying different scenarios and work arounds, the problem turned out to be MySQL connection was timing out. For some reason, the connection was not re-established when messages appear in the queue. Anybody faces a similar situation and what was the solution to it. Cheers,

Constantine Nicolaou

cnicolaou
A: 

This is an old thread, but just wanted to mention that the active messaging gem had a bug where it was not renewing the connections - it was working for older versions of Rails, but broke somewhere around 2.1. It is now working again.

Andrew Kuklewicz
A: 
It is now working again.

Not for me. Using 0.7.1 and still having the same issue. Every once in a while AM gets disconected from a subscribed queue in AMQ.

sandro d.