PDA

View Full Version : JMS Message Selectors


vavramov2
Feb 21st, 2008, 11:23 AM
I was able to configure a filter for the endpoint, but it picks up all messages off the queue and then simply discards the ones that do not pass the filter.

I am looking for the ability to create a MessageSelector that will leave the filtering to the message server. I traced the code from the JmsMessageDrivenSourceAdapter up the call stack and see that I can set a selector inside the DefaultMessageListenerContainer.

Now, I have the following 2 questions:
1) Are there any plans for the Filter and Selector concepts to converge, whereby there is a JMS implementation of a filter which is a selector?
2) In order to facilitate overriding JmsMessageDrivenSourceAdapter, can you make the container instantiation to be injected instead of instantiated? Also making the initialization/member variables protected would be very helpful too.

Thanks,

Vassil

iiinc
Apr 14th, 2008, 01:13 PM
I'd be very interested in a response to this from the SpringSource folks.

Mark Fisher
Apr 14th, 2008, 01:23 PM
The JmsMessageDrivenSourceAdapter does provide a "setContainer(AbstractMessageListenerContainer)" method. However, we should probably provide support for setting a JMS MessageSelector directly. Feel free to create an issue in JIRA: http://jira.springframework.org/browse/INT

Thanks,
Mark