ttt
ttt

Reputation: 431

How to filter jms messages in spring

There is an application on Spring Boot, it puts its jms requests in one queue and takes the answers from the other. One more application is working with the queue of responses. Requests ~ 100 per second. Actually, the problem is how to process them and choose what I need? Now I read all the messages from the queue using @ JmsListener, but those that are not intended for my application are drawn. To create a thread and wait for the answer separately in it turns out to me it seems not a good idea because there can be several thousand threads. How to be?

Upvotes: 1

Views: 768

Answers (1)

Gary Russell
Gary Russell

Reputation: 174664

You can use a Spring Integration Aggregator to avoid suspending a thread to wait for the result.

Upvotes: 2

Related Questions