简体   繁体   English

使用ActiveMQ 5,是否可以在内存和网络连接中配置代理?

[英]Using ActiveMQ 5, is it possible to configure the broker with in memory and network connections?

We have a set of applications that I want to use JMS for messaging between. 我们有一组应用程序,我想使用JMS在它们之间进行消息传递。 Right now, our applications all make TCP connections to the ActiveMQ broker. 现在,我们所有的应用程序都建立了与ActiveMQ代理的TCP连接。 Is it possible to make the 15 or so applications that are on the same host use the inVM connections or use a form of shared memory while the remaining 20 or so applications that are off of that host use TCP still? 是否可以使同一主机上的15个左右应用程序使用inVM连接或使用共享内存的形式,而离开该主机的其余20个左右应用程序仍使用TCP?

Basically, I want combine a broker configured with inVM and a broker configured with TCP. 基本上,我想将配置有inVM的代理和配置有TCP的代理结合在一起。 Can I do that, or do I have to do a bridge configuration? 我可以这样做,还是必须进行网桥配置?

The inVM connections only work if the applications are within the same JVM. 仅当应用程序在同一JVM中时,inVM连接才起作用。

If they are on the same box but in different processes, then TCP is the best bet. 如果它们在同一个盒子上,但进程不同,那么TCP是最好的选择。 Most operating systems will use efficient TCP implementations so that you are not actually going onto the network to communicate between the local processes. 大多数操作系统将使用有效的TCP实现,因此您实际上并不会进入网络在本地进程之间进行通信。

Messaging is stream based, so shared memory doesn't really help with ActiveMQ. 消息是基于流的,因此共享内存对ActiveMQ并没有真正的帮助。 Its really just a choice of TCP or VM if your application is within the same JVM as the broker 如果您的应用程序与代理位于同一个JVM中,则实际上只是选择TCP或VM

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

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