Yes, I was wrong. Sorry for the incorrect info.

Joshua

On 3/14/2012 5:30 PM, Steve wrote:
Shripad,

You are correct. 3.1 *does* filter the messages on the publisher side whereas 2.1 does not. I verified this with WireShark as well.

Thanks again,

Steve



On Wed, Mar 14, 2012 at 1:51 PM, Steve <[email protected] <mailto:[email protected]>> wrote:

    Shripad,

    It sounded like Pub/Sub was essentially the same on 2.1 vs 3.1
    other than the XPUB / XSUB.  So, I just took the example from the
    0MQ guide which is v2.1 I believe.  I will try your test on 3.1
    and verify.

    Thanks for looking into this!

    Steve



    On Wed, Mar 14, 2012 at 3:07 AM, Shripad K
    <[email protected] <mailto:[email protected]>>
    wrote:

        Steve I just checked via Wireshark. It is doing PUB side
        filtering. Are you sure that you are testing this with zmq
        3.1? I setup a simple PUB/SUB in zeromq.node
        <https://github.com/shripadk/zeromq.node> fork. Here is my
        test code:

        // subscriber:
        var zmq = require('zmq-3.0');
        var sub = zmq.createSocket('sub');
        sub.connect('tcp://0.0.0.0:3333');

        sub.on('message', function(buf) {
        console.log(buf.toString());
        });
        sub.subscribe('a');

        // publisher:
        Array.prototype.rotate = function() {
        var elem = this.shift();
        this.push(elem);
        return elem;
        };
        var zmq = require('zmq-3.0');
        var pub = zmq.createSocket('pub');
        pub.bindSync('tcp://0.0.0.0:3333');

        var arr = ['a', 'b', 'c'];
        var count = 0;

        setInterval(function() {
        pub.send( arr.rotate() + ':' + (count++) );
        }, 2500);

        With 2.1 Wireshark shows that it is performing a subscriber
        side filtering. Not with 3.1 though.

        On Wed, Mar 14, 2012 at 1:05 PM, Ian Barber
        <[email protected] <mailto:[email protected]>> wrote:



            On Wed, Mar 14, 2012 at 1:31 AM, Joshua Foster
            <[email protected] <mailto:[email protected]>> wrote:

                PUB functions the same in 3.1 as 2.1, but XPUB
                actually does publisher side filtering. (if I read the
                code correctly)

                Joshua


            Don't think you did Joshua - they both use the same
            distribution code (dist/send to matching). Pub is really
            just a very thin wrapper around Xpub, and removes the
            recving of subs to the app code.

            Ian

            _______________________________________________
            zeromq-dev mailing list
            [email protected]
            <mailto:[email protected]>
            http://lists.zeromq.org/mailman/listinfo/zeromq-dev



        _______________________________________________
        zeromq-dev mailing list
        [email protected] <mailto:[email protected]>
        http://lists.zeromq.org/mailman/listinfo/zeromq-dev





_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to