Java 轻量级 JMS 代理

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2507536/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 08:36:42  来源:igfitidea点击:

Lightweight JMS broker

javajmsmessaging

提问by nixau

I'm looking for a small and yet efficient enough lightweight JMS broker solution with no or minimum of dependencies. My messaging code should be running in the environment with a lot of dependencies I have no control of. Thus it would make ridiculous to deploy say ActiveMQ solution along with my custom bunch of classes.

我正在寻找一个小而高效的轻量级 JMS 代理解决方案,没有或最少的依赖项。我的消息传递代码应该在具有许多我无法控制的依赖项的环境中运行。因此,将 ActiveMQ 解决方案与我的自定义类一起部署会很荒谬。

采纳答案by nixau

Currently I'm investigating FFMQsolution. It's open source (GNU LGPL license), has only 4 dependencies (commons-logging, log4j, jms and jmx), and it's mature enough to accomplish my goals.

目前我正在研究FFMQ解决方案。它是开源的(GNU LGPL 许可证),只有 4 个依赖项(commons-logging、log4j、jms 和 jmx),并且它足够成熟以实现我的目标。

回答by soody

I assume that you are looking for lightweight solutions for JMS provider and dont want go with (EMS, Apache etc.) but still need to use JMS.

我假设您正在为 JMS 提供者寻找轻量级解决方案,并且不想使用(EMS、Apache 等)但仍需要使用 JMS。

Have a look at Building a Lightweight JMS Providermay be this is what you need.

看看构建一个轻量级的 JMS 提供者可能是你需要的。

回答by Andrew B

Especially if you're using spring, don't count activemq out. You can also run it as an embedded server, and it isn't really all that heavyweight.

特别是如果您使用的是 spring,请不要将 activemq 排除在外。您也可以将它作为嵌入式服务器运行,它并不是真正的重量级。

Look at: http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html

看看:http: //activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html

回答by yglodt

If JMSis not a hard requirement, and you are simply looking for a Messaging/Event system, you should take a look at Java EE 6 Events:

如果JMS不是硬性要求,并且您只是在寻找消息/事件系统,则应该查看 Java EE 6 Events:

http://java.dzone.com/articles/java-ee6-events-lightweight

http://java.dzone.com/articles/java-ee6-events-lightweight

回答by user908510

However ActiveMQ distribution is large, it can be shrinked down to a few jar about 3MB all

但是ActiveMQ分布很大,可以全部缩小到3MB左右的几个jar