简体   繁体   English

JMS:在同一个应用程序中有一个生产者和相关的消费者有意义吗?

[英]JMS: does it make sense to have a Producer and the related Consumer in the same application?

I'm new to JMS, and would like to know if does it make sense to have a Producer and the related Consumer in the same application?我是 JMS 新手,想知道在同一个应用程序中拥有生产者和相关消费者是否有意义? If it does, what are the cases for example?如果是这样,例如是什么情况?

It is technically possible to use JMS to exchange messages between components in the same application, but generally speaking it would almost certainly be simpler to just use the language features and APIs provided by Java SE.在技​​术上可以使用 JMS 在同一应用程序中的组件之间交换消息,但一般来说,仅使用 Java SE 提供的语言特性和 API 几乎肯定会更简单。 This would prevent you from having to configure and administer a JMS broker.这将使您不必配置和管理 JMS 代理。

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

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