Issue 11733

Investigate if we can detect connection loss and automatically reconnect

11733
Reporter: lfrancke
Type: Improvement
Summary: Investigate if we can detect connection loss and automatically reconnect
Priority: Major
Status: Open
Created: 2012-08-24 11:12:13.485
Updated: 2013-12-06 12:06:46.252
        
Description: At the moment we can never recover from a connection loss (e.g. RabbitMQ restarted) and all methods will fail. Callbacks will just not be called anymore.

See how/if we can incorporate automatic reconnects.]]>
    


Author: lfrancke@gbif.org
Comment: If we can't do that we definitely need to detect connection loss and log it.
Created: 2012-10-24 15:19:53.175
Updated: 2012-10-24 15:19:53.175


Author: lfrancke@gbif.org
Created: 2013-03-05 17:07:37.708
Updated: 2013-03-05 17:07:37.708
        
The way we have implemented the Postal Service at the moment ist that we pass in a Connection object.

If that connection fails the messaging service has no way of reconnecting. It can detect lost connection and it can log it as well but it can't reconnect.

This situation definitely needs to improve. We could change it to pass in connection parameters instead so it can reconnect. Another option would be to throw IllegalStateExceptions on everything and _somehow_ notify the services listening for messages so that they can reconnect or abort.

In the current situation we'll never learn of a connection loss and think everything is allright. That's obviously not a good situation to be in.

Any opinions? [~omeyn@gbif.org] || [~trobertson@gbif.org]?
    


Author: omeyn@gbif.org
Comment: I think passing the connection params is the way to go. Maybe make a MessagingServiceParams object so that it's a bit tidier to construct.
Created: 2013-03-07 09:05:01.824
Updated: 2013-03-07 09:05:01.824


Author: lfrancke@gbif.org
Comment: Another (probably easier) option would be to use https://github.com/zanox/rabbiteasy under the hood.
Created: 2013-03-26 10:43:34.275
Updated: 2013-03-26 10:43:34.275