嵌入式和独立 activemq 代理之间的区别 [英] difference between embedded and standalone activemq broker

查看:28
本文介绍了嵌入式和独立 activemq 代理之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用 Spring.我想知道嵌入式"ActiveMQ 和独立"ActiveMQ 之间有什么区别.如果我运行嵌入式 ActiveMQ,这是否意味着远程客户端仍然可以连接?我的理解是否正确,嵌入的 ActiveMQ 意味着 ActiveMQ 将在我启动 Spring 应用程序时自动启动,还是有其他含义?

I am using Spring for my application. I am wondering what differences there is between "embedded" ActiveMQ and "stand-alone" ActiveMQ. If I run ActiveMQ embedded, does thing mean remote clients can still connect up? Is my understand correct that embeded ActiveMQ means that ActiveMQ will start automatically when I start my Spring application, or is there some other meanings to it?

例如,假设我在系统 A 中部署了一个应用程序,并在系统 B 中部署了相同的应用程序.在应用程序中,我通过 spring xml 文件配置了嵌入式 ActiveMQ 代理,代理 url 为 tcp:10.1.1.10;

For example Let's say I have deployed one application in system-A and deployed the same application in system-B.in the application I have configured embedded ActiveMQ broker through spring xml files with broker url as tcp:10.1.1.10;

如果我在系统 A 中向 activemq 代理发送消息,我可以在系统 B 中使用相同的消息吗?

If I send messages to activemq broker in system-A ,can I consume the same messages in system-B?

推荐答案

Embedded ActiveMQ vs Standalone ActiveMQ 区别正是Embedded"和Standalone"这两个词之间的区别.

Embedded ActiveMQ vs Standalone ActiveMQ difference is exactly the difference between the words 'Embedded' and 'Standalone'.

让我在 Camel 应用程序的上下文中解释:

Let me explain in context of a Camel Application:

StandAlone ActiveMQ 意味着,您拥有 ActiveMQ 并将您的 Camel 应用程序 jar 文件移动到其 Lib 文件夹中.您在 Activemq 的 activemq.xml 文件中导入 Camel 应用程序的 camel-context.xml 文件.您启动 activeMQ.sh,它会启动 ActiveMQ 并用它创建您的 Camel Routes.

StandAlone ActiveMQ means, that you have ActiveMQ and you move your Camel Application jar file into its Lib folder. You import the Camel Application's camel-context.xml file in your Activemq's activemq.xml file. You start activeMQ.sh which starts ActiveMQ and creates your Camel Routes with it.

请注意,我们正在将工件移动到不在任何其他容器内的 ActiveMQ 发行版.这个 ActiveMQ 发行版可以在你的本地机器上.

Note here, we are moving artifacts to ActiveMQ distribution which is not inside any other container. This ActiveMQ distribution can be on your local machine itself.

另一方面:

嵌入式 ActiveMQ 意味着您向其他容器提供 ActiveMQ 能力.例如,您在任何应用程序服务器中启用 ActiveMQ 功能.在这种情况下,您不会启动 ActiveMQ 本身.您只需启动封闭容器,ActiveMQ 功能就会在容器启动时可用.

An Embedded ActiveMQ means that you provide ActiveMQ ability to some other container. For example, You enable ActiveMQ capabilities in any Application Server. In this case you do not start ActiveMQ per se. You simply start the enclosing container and ActiveMQ capabilities are made available as the container startsup.

例如,您可以在本地计算机上安装 Tomcat.您在 Tomcat 的 lib 文件夹中移动了几个相关的 activeMq jar.在某些情况下,您可能需要配置 Tomcat 的配置文件.例如,如果您将队列作为 JNDI 对象提供,则需要将队列配置为资源.

For example, you can have Tomcat on your local machine. You move few relevant activeMq jars in Tomcat's lib folder. You may have to configure Tomcat's config file in some scenarios. For instance in case you are providing queues as JNDI object, then the queue needs to be configured as a Resource.

希望这会有所帮助.

参考:http://icodingclub.blogspot.com/2011/09/spring-jms-with-embeded-activemq-in.html

这篇关于嵌入式和独立 activemq 代理之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆