Hi all,

I have committed the initial implementation in revision r199114 where it
does provide selector support for Queues and Durable Topics. When looking
at the source i could find that we were already having message selectors
for Topics and there was no need to re-implement it.

Since there are a whole list of different patterns that can be used in
selector strings we need to test them extensively against both
topics/queues and identify which literals,logics etc. are supported by
selectors and which are not. As the first phase we are going to test
against the selectors in [1] as well as testing against all the JMS headers
and properties.

As per the JMS Headers the following headers are supported with selectors,
where a client can set and send to broker.

*JMSCorrelationID  JMSReplyTo  JMSType *

The below header properties will not be filtered by broker since they are
handled by the JMS provider and set into the default values at broker side
as describer here. [2]

*JMSPriority  JMSExpiration  JMSDeliveryMode*

Once these are tested we can update the MB 2.2.0 docs with supported
syntaxes and headers for Message Selectors.

Thanks!
Ishara

[1]
http://www.novell.com/documentation/extend5/Docs/help/Composer/books/JMSAppendixB.html
[2] http://docs.oracle.com/cd/E19798-01/821-1841/bnces/index.html



On Thu, Mar 27, 2014 at 10:34 AM, Pamod Sylvester <pa...@wso2.com> wrote:

> +1 to handle it from the server side, also considering the fact of sending
> irrelevant messages to client will be an additional network overhead.
>
>
> On Thu, Mar 27, 2014 at 10:18 AM, Ishara Premadasa <ish...@wso2.com>wrote:
>
>> Hi all,
>>
>> We are going to implement message selectors support [1] into WSO2 Message
>> Broker where a message consumer is allowed to specify the messages it is
>> interested by using a selector string and the broker (JMS provider) does
>> the filtering of messages according to that query. The syntax of the JMS
>> selector expression is based on a subset of SQL92, mentioned here [2].
>>
>> Message selectors can be implemented either using the client-side or
>> server-side. As the first try i have tried with filtering the messages in
>> the client-side where the filtering happens after the message is dispatched
>> into client side.
>>
>> However we had some considerable issues with this method since the
>> messages which were rejected by the consumer's selector cannot be
>> re-delivered to other consumers who do not have filters, and those messages
>> were stuck in queue. Therefore since this was not possible to be handled in
>> the client-side we moved the implementation server-side.
>>
>> Therefore with the current implementation at server side when the
>> messages are sending out to subscribers we check whether the message
>> matches the filters and if so that will be given out to the subscriber. If
>> not that message will be removed from already read messages, hence it can
>> be given to another matching subscriber in the next round.
>>
>> I will be updating this thread with the progress of the implementation.
>> The plan is to send this out with 2.2.0 version, however if takes more time
>> this will be definitely available with MB 3.0.0 version.  Any
>> feedback/suggestions are welcome.
>>
>> Thanks!
>> Ishara
>>
>> [1] http://docs.oracle.com/cd/E19798-01/821-1841/bncer/index.html
>> [2]
>> http://www.novell.com/documentation/extend5/Docs/help/Composer/books/JMSAppendixB.html
>>
>>
>> --
>> Ishara Premasada
>> Software Engineer,
>> WSO2 Inc. http://wso2.com/
>>
>>
>> *Blog   :  http://isharapremadasa.blogspot.com/
>> <http://isharapremadasa.blogspot.com/>Twitter       :
>> https://twitter.com/ishadil <https://twitter.com/ishadil> Mobile       :
>> +94 714445832 <%2B94%20714445832>*
>>
>>
>>
>
>
> --
> *Pamod Sylvester *
>  * Software Engineer *
> Integration Technologies Team, WSO2 Inc.; http://wso2.com
> email: pa...@wso2.com cell: +94 77 7779495
>



-- 
Ishara Premasada
Software Engineer,
WSO2 Inc. http://wso2.com/


*Blog   :  http://isharapremadasa.blogspot.com/
<http://isharapremadasa.blogspot.com/>Twitter       :
https://twitter.com/ishadil <https://twitter.com/ishadil>Mobile       : +94
714445832*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to