Spring AMQP
  1. Spring AMQP
  2. AMQP-259

Use Spring Retry for Listener Container Reconnect

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Primarily for HA failover, the BlockingQueueConsumer has a crude mechanism for re-declaring the queues. It tries 3 times, waiting 5 seconds for each.

      Consider using the Spring RetryTemplate, with pluggable backoff and retry policies to reconnect the consumer after a failure.

        Activity

        Hide
        Gary Russell added a comment -

        Also, when a RetryTemplate is provided,failure to connect to a queue that is not declared should NOT prevent the entire application context from initializing.

        http://forum.springsource.org/showthread.php?128757-FatalListenerStartupException-Cannot-prepare-queue-for-listener

        Show
        Gary Russell added a comment - Also, when a RetryTemplate is provided,failure to connect to a queue that is not declared should NOT prevent the entire application context from initializing. http://forum.springsource.org/showthread.php?128757-FatalListenerStartupException-Cannot-prepare-queue-for-listener
        Show
        Artem Bilan added a comment - PR: https://github.com/spring-projects/spring-amqp/pull/157

          People

          • Assignee:
            Artem Bilan
            Reporter:
            Gary Russell
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: