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

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

问题描述

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



例如,假设我有在系统A中部署了一个应用程序,在系统B中部署了相同的应用程序。在该应用程序中,我已通过Spring xml文件(代理URL为tcp:10.1.1.10)配置了嵌入式ActiveMQ代理;



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

解决方案

嵌入式ActiveMQ与独立ActiveMQ的区别恰恰是嵌入式和独立两个词之间的区别。



让我在骆驼应用程序的上下文中进行解释:



StandAlone ActiveMQ意味着,您拥有ActiveMQ,并将您的Camel Application jar文件移动到其Lib文件夹中。您将Camel应用程序的camel-context.xml文件导入Activemq的activemq.xml文件中。
您将启动activeMQ.sh,它会启动ActiveMQ并使用它创建您的骆驼路线。其他容器。此ActiveMQ发行版可以在本地计算机上。



另一方面:



嵌入式ActiveMQ 意味着您向其他容器提供ActiveMQ功能。例如,您在任何Application Server中启用ActiveMQ功能。在这种情况下,您本身不会启动ActiveMQ。您只需启动封闭的容器,ActiveMQ功能就可以在容器启动时使用。



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



希望这会有所帮助。



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


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?

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;

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

解决方案

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

Let me explain in context of a Camel Application:

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.

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.

On the Other Hand:

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.

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.

Hope this helps.

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

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

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