Description
Christopher Shannon opened SPR-12884 and commented
I am currently using STOMP over Websockets and the Simple message broker to publish messages to clients. In my case, the simple message broker support works great, except the one feature that is missing that would be really useful is message selector support to filter out certain messages sent to clients. I could use a full featured message broker for this feature but a full broker is a bit overkill for what I need.
I suggest adding message selector support to the Simple message broker (or to another internal broker in spring). Instead of having to write custom logic to filter messages, it would be nice to be able to register a selector in a header to filter out messages dynamically.
Adding support for a JMS message selector expression (which is based on a subset of SQL92 conditional syntax) would be great but would probably be difficult and might best suited to leave for a full featured broker.
Something else that might work instead would be to use a syntax based on the Spring Expression Language if there is a good way to implement this in a generic way. This should be a lot more straight forward since SpEL is used elsewhere all over the framework.
Even if SpEL wouldn't work really work, just having basic filtering support on headers by using a syntax such as "someProperty = 'true'" or "someProperty > 10" would be useful.
Affects: 4.1.6
Issue Links:
- ConcurrentModificationException when calling SimpMessagingTemplate.convertAndSend [SPR-13185] #17777 ConcurrentModificationException when calling SimpMessagingTemplate.convertAndSend
- NullPointerException possible in DefaultSubscriptionRegistry [SPR-13204] #17796 NullPointerException possible in DefaultSubscriptionRegistry