简体   繁体   English

将 Boomi JMS 连接器配置到 ActiveMQ Artemis

[英]Configuring Boomi JMS connector to ActiveMQ Artemis

I've been using a JMS connector in Boomi to connect with ActiveMQ Artemis 2.14, but using the client library activemq-all-5.15.11.jar and factory org.apache.activemq.jndi.ActiveMQInitialContextFactory This works, except I'm having issues with the connections creating numerous org.apache.activemq.artemis.core.server.impl.MessageReferenceImpl objects in the heap, which aren't associated with the actual messages, but rather the ActiveMQ.Advisory.TempQueue .我一直在 Boomi 中使用 JMS 连接器与 ActiveMQ Artemis 2.14 连接,但使用客户端库 activemq-all-5.15.11.jar 和工厂org.apache.activemq.jndi.ActiveMQInitialContextFactory除外在堆中创建大量org.apache.activemq.artemis.core.server.impl.MessageReferenceImpl对象的连接问题,这些对象与实际消息无关,而是与ActiveMQ.Advisory.TempQueue相关联。

So I'm trying to setup a Boomi JMS connector using the ActiveMQ Artemis 2.14 client.所以我正在尝试使用 ActiveMQ Artemis 2.14 客户端设置 Boomi JMS 连接器。 I have the following libraries imported into the Atom:我将以下库导入到 Atom 中:

  • activemq-core-5.4.1.jar activemq-core-5.4.1.jar
  • artemis-core-client-2.14.0.jar artemis-core-client-2.14.0.jar
  • artemis-jms-client-2.14.0.jar artemis-jms-client-2.14.0.jar
  • artemis-jms-client-all-2.14.0.jar artemis-jms-client-all-2.14.0.jar
  • fscontext-4.6-b01.jar fscontext-4.6-b01.jar
  • geronimo-j2ee-management_1.1_spec-1.0.1.jar geronimo-j2ee-management_1.1_spec-1.0.1.jar

Then I created a Custom Library, set it to Connector JMS, and added the above libraries and deployed to the Atom.然后我创建了一个自定义库,将其设置为连接器 JMS,并添加上述库并部署到 Atom。 In the connector I specified ActiveMQ, and the ConectionFactory org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory在我指定 ActiveMQ 的连接器中,以及 ConectionFactory org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory

This gives me a java dump, complaining that "Unable to create initial context" and "Invalid broker URL" My URL is a little fancy, but it works for the other ActiveMQ JMS connector.这给了我一个 java 转储,抱怨“无法创建初始上下文”和“无效的代理 URL”我的 URL 有点花哨,但它适用于其他 ActiveMQ JMS 连接器。

failover:(tcp://[host]:61616,tcp://[host]:61616)?startupMaxReconnectAttempts=2&maxReconnectAttempts=0&maxReconnectDelay=1000

So I tried a simple URL, just tcp://[host]:61616 This give me a strange error: "Unexpected error executing process: java.lang.NoClassDefFoundError: org/jboss/logging/Logger" So I tried a simple URL, just tcp://[host]:61616 This give me a strange error: "Unexpected error executing process: java.lang.NoClassDefFoundError: org/jboss/logging/Logger"

So does this mean I'm including a library that I don't need, which needs the jboss logger, or do I actually need the jboss logger library?那么这是否意味着我包含了一个我不需要的库,它需要 jboss 记录器,还是我实际上需要 jboss 记录器库?

Any guidance on this is appreciated.对此的任何指导表示赞赏。

There are lots of issues to discuss here.这里有很多问题要讨论。 I'll take each one in turn.我会依次拿走每一个。

...I'm having issues with the connections creating numerous...objects in the heap, which aren't associated with the actual messages, but rather the ActiveMQ.Advisory.TempQueue . ...我遇到了在堆中创建大量...对象的连接问题,这些对象与实际消息无关,而是与ActiveMQ.Advisory.TempQueue相关联。

You should be able to resolve this by setting supportAdvisory=false on the acceptor in broker.xml which your clients are using.您应该能够通过在您的客户正在使用的broker.xml中的acceptor上设置supportAdvisory=false来解决此问题。 This is discussed in the OpenWire chapter in the ActiveMQ Artemis user manual .在 ActiveMQ Artemis 用户手册的 OpenWire 章节中进行了讨论。

I have the following libraries imported into the Atom...我将以下库导入 Atom...

The only library you should actually need is artemis-jms-client-all-2.14.0.jar .您实际需要的唯一库是artemis-jms-client-all-2.14.0.jar As the name suggests, it contains all of the ActiveMQ Artemis client code along with all of the dependencies (eg Netty, JMS API classes, JBoss Logging framework, etc.).顾名思义,它包含所有ActiveMQ Artemis 客户端代码以及所有依赖项(例如 Netty、JMS API 类、JBoss 日志框架等)。

In the connector I specified ActiveMQ, and the ConectionFactory org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory在我指定 ActiveMQ 的连接器中,以及 ConectionFactory org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory

The class org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory is not a JMS ConnectionFactory implementation. class org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory不是JMS ConnectionFactory实现。 It is an InitialContextFactory implementation for JNDI.它是 JNDI 的InitialContextFactory实现。

This gives me a java dump, complaining that "Unable to create initial context" and "Invalid broker URL" My URL is a little fancy, but it works for the other ActiveMQ JMS connector.这给了我一个 java 转储,抱怨“无法创建初始上下文”和“无效的代理 URL”我的 URL 有点花哨,但它适用于其他 ActiveMQ JMS 连接器。

The URL you're using is suitable for the OpenWire JMS client used for ActiveMQ 5.x (which you were using previously).您正在使用的 URL 适用于用于 ActiveMQ 5.x(您之前使用过)的 OpenWire JMS 客户端。 However, it is invalid for the core JMS client used for ActiveMQ Artemis (which you are using now).但是,它对于用于 ActiveMQ Artemis(您现在正在使用的)的核心 JMS 客户端无效。 You can use something like this instead:你可以改用这样的东西:

(tcp://[host]:61616,tcp://[host]:61616)?ha=true&initialConnectAttempts=2&reconnectAttempts=0&maxRetryInterval=1000

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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