【发布时间】:2020-06-02 06:18:58
【问题描述】:
我已经在我的计算机上本地设置了一个 Artemis HA-Custer 示例,以了解它的基本工作原理。现在我想准备将其推送到 Kubernetes 集群中。因此,我想更改代理节点的初始成员发现方式,因此我也可以在云中使用它。我想将 JMS 和 JGroups 与“jdbc_ping”一起使用。其实我不确定,如果我做得对,所以也许你可以告诉我。
到目前为止,经纪人已成功地将他们的信息放入 db-table 中并且显然已连接。当我从我的 java 应用程序中尝试以下 connectionFactory 时,它启动时没有错误并与代理连接。但在某些方面,我不确定它是否正确运行。
@Bean
public ConnectionFactory connectionFactory() {
TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName());
ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, transportConfiguration);
return cf;
}
所以现在唯一的问题是,如何正确设置 connectionFactory 以使用 JGroups。
更新:
INFO 24528 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : JMS message listener invoker needs to establish shared Connection
ERROR 24528 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Could not refresh JMS Connection for destination 'TestA' - retrying using FixedBackOff{interval=5000, currentAttempts=0, maxAttempts=unlimited}. Cause: Failed to create session factory; nested exception is ActiveMQInternalErrorException[errorType=INTERNAL_ERROR message=AMQ219004: Failed to initialise session factory]
【问题讨论】:
标签: spring-boot spring-jms activemq-artemis jgroups