Description
See AMQ-2114 for background.
And from this discussion
http://www.mail-archive.com/dev@activemq.apache.org/msg09960.html
I do believe it would be great if there was 2 options to set the maxReconnectAttempts option
- maxReconnectAttempts = the existing we have now for reconnecting when consumer has been started
- startupMaxReconnectAttempts = a new option when starting consumer to avoid it potentially blocking for a very long time in case of connection not possible
For example when end users use Camel or other other frameworks with AMQ where it acts as a client to consume from a AMQ queue it will hang/block on startup if the connection cannot be established. So we end up in a catch-22 situation.
We want to just try a X number of times and then go on so the rest can start up properly. And the the AMQ consumer should remedy the issue itself over time by automatic under the covers try to reconnect (based on the maxReconnectAttempts) option.
And you could also support (if not already) setting the values to -1 to indicate forever. Then you can configure these options explict to highlight this fact, for example
startupMaxReconnectAttempts=5&maxReconnectAttempts=-1
See also details here
http://fusesource.com/forums/thread.jspa?messageID=4347჻