Hi Akalanka,

Could we also consider the approach used by the ProtocolProcessor of
Moquette ?

Where all the subscriptions are kept in a Tree based on their hierarchy
 and when a message is published, the published topic is split into tokens,
and then the tree will be traversed for a match. When a match is found, the
message would be sent to the ancestral node and its descendants.

It might also be good if we could find a way to point to the functionality
Moquette has introduced for cluster wide subscription identification as
well. This way if the protocol introduces a different set of wild cards,
the change will be reflected from the library itself. WDYT ?

Thanks,
Pamod

On Thu, Dec 4, 2014 at 12:34 AM, Chamila De Alwis <[email protected]> wrote:

> Hi Akalanka,
>
> Even though for the multi-level wildcard using if else might be simpler,
> since the single-level wildcard can appear in several places of the topic
> name wouldn't it be better to follow the regex approach?
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Wed, Dec 3, 2014 at 2:49 PM, Akalanka Pagoda Arachchi <
> [email protected]> wrote:
>
>> Hi all,
>>
>> I am implementing wildcard support for MQTT in WSO2 MB.
>>
>> The MQTT 3.1 Specification [1] provides details about how the wildcards
>> should behave.
>>
>> According to this, to implement this match making I can either use
>> java.lang.String functions and if else conditions or use a regular
>> expression.
>>
>> I believe a regular expression will be a bit more complex to understand
>> and hence prefer to use if else conditions. What will be best way to
>> approach this?
>>
>>   [1] -
>> http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718107
>>
>> Thanks,
>> Akalanka
>> --
>> *Akalanka Pagoda Arachchi,*
>> *Software Engineer*
>> *078-4721791 <078-4721791>*
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Pamod Sylvester *
 *Senior Software Engineer *
Integration Technologies Team, WSO2 Inc.; http://wso2.com
email: [email protected] cell: +94 77 7779495
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to