当 weblogic JMS 服务器出现故障时,我们失去了 JMS 客户端连接。它导致重新启动我们的客户端管理服务器以重新连接 JMS 服务器。 如何配置weblogic重连策略?以下是connectionFactory 和消息监听器容器的应用程序上下文配置。
<bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jndiTemplate" />
<property name="jndiName" value="jndiName" />
</bean>
<bean class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="destination" ref="destination0"/>
<property name="messageListener" ref="messageListener"/>
<property name="taskExecutor" ref="taskExecutor"/>
<property name="autoStartup" value="true" />
<property name="messageSelector" value="RECIPIENT = 'XYZ'"/>
<property name="concurrentConsumers" value="10"/>
<property name="maxConcurrentConsumers" value="50"/>
<property name="idleTaskExecutionLimit" value="10"/>
<property name="idleConsumerLimit" value="10"/>
</bean>
Weblogic 12c
Spring 3
最佳答案
由于您使用的是 JNDI,因此需要在 JNDI 提供程序中对其进行配置。
关于java - 如何在 Spring JMS 连接工厂中配置 weblogic 重新连接策略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44198498/