简体   繁体   English

在 java spring 中使用 ActiveMq 为多个项目创建公共代理

[英]Creating common broker for multiple projects using ActiveMq in java spring

I have two java projects.我有两个java项目。 Both of these projects use embedded ActiveMQ using Spring framework.这两个项目都使用 Spring 框架使用嵌入式 ActiveMQ。

How do I create a common broker for both of these projects?如何为这两个项目创建一个公共代理?

If Spring Boot is an option I would create an independant application and use ActiveMQ messages to communicate with both "projects".如果 Spring Boot 是一个选项,我会创建一个独立的应用程序并使用 ActiveMQ 消息与两个“项目”进行通信。

Go Microservices.去微服务。

Another alternative might be to just have a third project consuming and publishing to the same ActiveMQ instance.另一种选择可能是让第三个项目使用并发布到同一个 ActiveMQ 实例。 I don't see any issue there.我看不出那里有任何问题。 Actually a Message Bus is an excellent way of decoupling and communicating different projects or applications.实际上,消息总线是解耦和通信不同项目或应用程序的绝佳方式。

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

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