[zeromq-dev] Formally modelling the publish-subscribe pattern

John Lång john.lang at mykolab.com
Fri Oct 16 13:44:05 CEST 2020


Hi Kevin,

Thanks for the clarification!

Best regards,
John

On 16.10.2020 14.39, Kevin Sapper wrote:
>
> Hi John,
>
>       * SHALL create a queue when initiating an outgoing connection to
>         a subscriber, and SHALL maintain the queue whether or not the
>         connection is established.
>
> This action is taken when a SUB socket binds to an address and the PUB 
> socket connects to it.
>
>       * SHALL create a queue when a subscriber connects to it. If this
>         subscriber disconnects, the PUB socket SHALL destroy its queue
>         and SHALL discard any messages it contains.
>
> This action is taken when a PUB socket binds to an address and the SUB 
> socket connects to it.
>
>     What is the difference between initiating an outgoing connection
>     to a subscriber and a subscriber connecting to a publisher? In the
>     C++ source code of my system, a publisher binds to a PUB socket
>     and a subscriber connects to the address of a publisher. I guess
>     this sounds more like the second point, but I'm not certain.
>
> Yes, the second point!
>
>     Did I understand correctly that this message queue between a
>     publisher and a subscriber works FIFO? It says that for outgoing
>     messages, "SHALL silently drop the message if the queue for a
>     subscriber is full." Does this imply that those messages that fit
>     in the queue are delivered in the order they were sent in? I take
>     it that the queue being full means that the high water mark has
>     been exceeded.
>
> When a PUB socket enters the mute state due to having reached the high 
> water mark for a subscriber, then any messages that would be sent to 
> the subscriber in question shall instead be dropped until the mute 
> state ends. The send function does never block for this socket type.
>
>     What is a binary comparison? Is it the same as bitwise comparison?
>     To me, "binary comparison" sounds like just comparing two things
>     with each other.
>
> It means that the byte content of the first frame is compared against 
> the bytes of a subscription. Hence a subscription can use any binary 
> prefix not just characters.
>
> //Kevin
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20201016/08bc259f/attachment.htm>


More information about the zeromq-dev mailing list