Recovering from missing/delete queue

52 views
Skip to first unread message

Ritesh

unread,
Jul 26, 2016, 7:12:01 AM7/26/16
to Axon Framework Users

Hi,


We are using Axon Framework v2.4.3 and wanted to know how do we configure missing-queue-fatal as false.


We have seen that sometimes during some node switching on rabbit server, queue is available for sometime and we shutdown signal exception in our event handler. On finding out more about this, it is documented that when a queue goes missing, rabbit consumer tries to connect to the queue 3 times with time interval of 5 seconds between each attempt. This is because missing-queue-fatal configuration is set to true. If we set this to false, then recovery of consumer is started (after 3 attempts) and consumer shall try to connect to the queue after the recoveryInterval is elapsed and indefinite period. 


We tried configuring this (missing-queue-fatal with recovery-interval) in our event handler but couldn't find any documentation around this. Can somebody help us in this matter?


We tried configuring just recovery-internal in AMQP.Config but of no affect. We are unable to recover for ShutdownSignalException. 


Thanks in advance. 


Regards,

Ritesh


Allard Buijze

unread,
Jul 26, 2016, 10:11:54 AM7/26/16
to Axon Framework Users
Hi Ritesh,

there isn't a direct way to configure it, unfortunately. However, you can subclass the ListenerContainerLifecycleManager class and override the createContainer method. Call super.createContainer (which gives you Spring's SimpleMessageListenerContainer) and add whatever configuration you need on the returned object.

Since Axon's namespace configuration for Spring uses a hard-coded ListenerContainerLifecycleManager class, you will need to manually configure the bean and refrain from using the namespace configuration for the SpringAMQPTerminal.

Cheers,

Allard

--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ritesh

unread,
Jul 27, 2016, 3:49:05 AM7/27/16
to Axon Framework Users
Thanks Allard. 
We solved this by extending ListenerContainerLIfecycleManager class and then overriding the hard wired bean in our spring configuration. 

Regards,
Ritesh
Reply all
Reply to author
Forward
0 new messages