Re: Wildcard subscription with SSE (Event source)

49 views
Skip to first unread message
Message has been deleted

Wandenberg Peixoto

unread,
May 16, 2018, 11:42:21 AM5/16/18
to nginxpu...@googlegroups.com
Hi Pouya,

not sure if I understood your needs/use case can you explain a bit more?

Anyway, the wildcard_channel_prefix is to be used together with push_stream_authorized_channels_only, take a look at the docs and come back to me if not clear, please.

Best,
Wandenberg

On Wed, May 16, 2018 at 12:00 PM, Pouya Samadikhah <pspo...@gmail.com> wrote:
Hi,

I would like to use nginx push stream module for using event source (sse) eventing. 
I also would like to use wildcard subscription capability so i can have hierarchy - level subscription without duplicating events stored in the shared buffer. Basically I would like to have the mqtt wildcard support with SSE.

As an example:
Client A can subscribe to:
>>   1.  Foo/#
>>   2.  Foo/Foo2/#
>>   3.  Foo/Foo2/Foo3

The events that is triggering Foo3 should be stored 3 times, it should maintain one time but can be accessible through multi level subscriptions.

Is it possible to do it with the  push_stream_wildcard_channel_prefix capability of nginx push stream module??? 


Best,
Pouya

--
You received this message because you are subscribed to the Google Groups "nginxpushstream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nginxpushstream+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Wandenberg Peixoto

unread,
May 16, 2018, 2:55:55 PM5/16/18
to nginxpu...@googlegroups.com
Hi,

don't know how MQTT works, but at Push Stream module the channels are not hierarchical.
If you use the channels path like /Foo/Foo2/Foo3 what will happen is that you will subscribe 3 different channels: Foo, Foo2, and Foo3.
And any message published to any of these 3 channels will be sent to the client.
Also, there is no way to subscribe channels using wildcard, you have to explicitly specify each one of the channels id that you want to connect to. 

Kind regards,
Wandenberg

On Wed, May 16, 2018 at 6:31 PM, Pouya Samadikhah <pspo...@gmail.com> wrote:
HI,
Thanks for the quick reply. I meant that, with the wildcard capability, is it possible to do sth like what happens in MQTT??:

* single level hierarchy --> Foo/+/Foo3
As the name already suggests, a single level wildcard is a substitute for one topic level. The plus symbol represents a single level wildcard in the topic.

* multi-level hierarchy --> Foo/Foo2/#
While the single level wildcard only covers one topic level, the multi-level wildcard covers an arbitrary number of topic levels. In order to determine the matching topics, it is required that the multi-level wildcard is always the last character in the topic and it is preceded by a forward slash.

Therefore with this capability, it is possible to prevent duplication of events that are stored in different channels. Imagine if a subscriber subscribes to Foo1/Foo2/Foo3 and also to Foo1/Foo2//# , with wildcard support it is going to send the Foo1/Foo2/Foo3  one time and no duplication. However, if there is no such capability then there will be duplications of the same data.

In summary, in my use case which is an embedded device, I have a shortage of memory and i can have a big shared memory size also, I need to maintain the last state of the attributed which are hierarchical. I was thinking to use NCHAN, but it does not have wildcard support. 

Best,

Pouya
To unsubscribe from this group and stop receiving emails from it, send an email to nginxpushstre...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages