Is there a posibility to change which messages bean should get, using selector, while program is running? I can't change annotations, is there another option?
Asked
Active
Viewed 395 times
1 Answers
0
No you cannot change Message selector of a receiver dynamically at runtime.
For the simple reason it would led to lot of problems like order in which messages are delivered, Synchronization issues etc. Anyway there is no need to do it anyway. You want to receive messages based on two selectors create two receivers with those selector. Each receiver will receive message that matches the respective selector.

Aniket Thakur
- 66,731
- 38
- 279
- 289