简体   繁体   English

JMS Queue,作为生产者和使用者的一个应用程序

[英]JMS Queue, One application as producer and consumer

By using only one JMS Queue, is it possible for an application to consume and produce on it ? 通过仅使用一个JMS队列,应用程序是否可以在其上使用和产生?

Or it needs to use two JMS Queue ? 还是需要使用两个JMS Queue? One for consuming and other for producing. 一种用于消费,另一种用于生产。

Thanks you in advance. 预先谢谢你。

Yes it is perfectly valid to have one application to produce and consume messages from the same Q. 是的,拥有一个应用程序来产生和使用来自同一Q的消息是完全有效的。
Be careful with the transaction demarcation, ie "commit" the transaction after sending the message in order for the message to be "visible" to the consumer, including the consumer in your your application 注意事务划分,即在发送消息后“提交”事务,以使消息对使用者(包括您应用程序中的使用者)“可见”

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

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