JMS Queue, One application as producer and consumer

350 views Asked by At

By using only one JMS Queue, is it possible for an application to consume and produce on it ?

Or it needs to use two JMS Queue ? One for consuming and other for producing.

Thanks you in advance.

1

There are 1 answers

1
titou10 On

Yes it is perfectly valid to have one application to produce and consume messages from the same 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