我分别运行 ActiveMQ 5.8.0 和 Karaf 2.3.1。
我在 Karaf 中所做的是:(已安装所有其他:spring、cxf、camel)
功能:addUrl mvn:org.apache.activemq/activemq-karaf/5.8.0/xml/features
osgi:install -s mvn:org.apache.activemq/activemq-camel/5.8.0
功能:列表 | grep mq
显示:
[uninstalled] [2.11.0 ] camel-amqp camel-2.11.0
[uninstalled] [2.11.0 ] camel-mqtt camel-2.11.0
[uninstalled] [5.8.0 ] activemq-client activemq-5.8.0
[uninstalled] [3.1.3.RELEASE ] spring activemq-5.8.0
[uninstalled] [5.8.0 ] activemq-broker activemq-5.8.0
[uninstalled] [5.8.0 ] activemq-http activemq-5.8.0
[uninstalled] [5.8.0 ] activemq-camel activemq-5.8.0
[uninstalled] [5.8.0 ] activemq-web-console activemq-5.8.0
如果我安装activemq-broker
,它将安装服务器和ActiveMQ的所有内容,我不需要它。
在我的包之一中,我公开了camel-cxf端点,我从该端点将消息发送到队列。问题是,当我尝试安装我的 bundle 时,它给了我一个错误:
missing requirement [169.0] osgi.wiring.package; (osgi.wiring.package=org.apache.activemq)
我知道 Karaf 中安装的一些功能必须导出此包:org.apache.activemq
,但它们没有。
我找不到任何在 Karaf 中安装哪些功能的信息,它将单独使用 activemq 的东西。我不希望 Karaf 在其中运行 ActiveMQ。我只需要安装必要的功能。
有人可以指出我需要为此目的安装哪些功能吗?
最佳答案
我已经找到解决办法了。我只需要安装activemq-client
。这不会安装所有其他功能。
features:install activemq-client
关于java - ActiveMQ 与 Apache Karaf 2.3.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16333140/