简体   繁体   中英

spring-integration : switch on failover to IBM MQ queue

We have a situation where we need to implement functionality to handle below scenarios(using IBM MQ and Spring Integration):

  1. If a JMS queue fails intraday application should auto connect to another defined queue without loss of messages.

  2. Dynamically alter a queue configuration when the application is running, or even if we need to restart any unsent messages should not be lost.

Kindly provide your view on how to implement a good design for handling these scenarios as we are new to using spring integration.

You should declare one more JMS Outbound Channel Adapter for that second queue and have it as a second subscriber (with order=2 ) to the same direct channel. That channel must be configured with load-balancer="none" . This way if first handler fails to process message, it will be delivered to the second subscriber and so on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM