rabbitmq Retry/ Reconnection policy
Hi,
I am very new to rabbitmq. I have a question regarding the reconnection/retry attempt to rabbitmq server.
Is anyone tried to configure the retry/reconnection policy in spring amqp? Here is my scenario,
Consumer should be able to reconnect -send and receive messages from rabbitmq whenever its comes up.
<bean id="retryTemplate" class="org.springframework.retry.support.RetryTemp late">
<property name="retryPolicy">
<bean class="org.springframework.retry.policy.SimpleRetr yPolicy">
<property name="maxAttempts" value="1000"></property>
</bean>
</property>
</bean>
<bean id="retryInterceptor"
class="org.springframework.retry.interceptor.State fulRetryOperationsInterceptor"
p:retryOperations-ref="retryTemplate">
</bean>
<bean
class="org.springframework.amqp.rabbit.listener.Si mpleMessageListenerContainer"
p:connectionFactory-ref="rabbitConnectionFactory" p:queueNames="test.client.queue"
p:messageListener-ref="messageListener" p:adviceChain-ref="retryInterceptor"/>
Is this correct?