[zeromq-dev] Last value cache example not working
Pieter Hintjens
ph at imatix.com
Mon Aug 17 12:12:15 CEST 2015
Hi Ingar, sorry for the late reply, I'm spending a few weeks on a
mountain side somewhere with little Internet access.
The cache binds to both addresses and acts as proxy in the middle.
Your code then connects to the lvcache to get cached data.
On Wed, Jul 22, 2015 at 4:23 PM, Ingar Pedersen <ifp.hj at online.no> wrote:
> Hi,
>
>
>
> I have been testing and debugging, but not been able to find the root cause
> of my problem yet, however I have been able to get it working, but need some
> help understanding why...
>
>
>
> The problem is the pathopub doesn't send messages to lvcache, and I have
> narrowed it down to subscriptions not been registered with pathopub for some
> reason.
>
>
>
> I'm now running ZMQ 4.1.2 and CZMQ 3.0.2 all compiled locally, and all make
> check tests passed.
>
>
>
> The original lvcache.c fails:
>
> void *frontend = zsocket_new (context, ZMQ_SUB);
> zsocket_bind (frontend, "tcp://*:5557");
>
>
>
> But if I modify to:
>
> void *frontend = zsocket_new (context, ZMQ_SUB);
> zsocket_connect (frontend, "tcp://127.0.0.1:5557");
>
>
>
> Then suddenly everything works as expected.
>
> if I change connect back to bind (leaves the address as is) then it fails
> again, also connect with original address fails.
>
>
>
> And the funny thing, as before, if I use C#, the bind with * works just fine
> for both sockets in lvcache.
>
>
>
> So it appears to me there must be something weird going on in the C binding
> in my case...
>
>
>
> Any ideas?
>
>
>
> Best regards
>
> Ingar F Pedersen
>
>
>
>
>
> Den 19.06.2015 16:52, skrev Ingar Pedersen:
>
> Hi,
>
>
>
> Since lvcache prints "sending cached topic xxx" when pathosub is started it
> seems the subscription from pathosub to lvcache is working. I'll try to
> debug the pathopub and lvcache to see if I can find the subscription...
>
>
>
> Ingar
>
>
>
>
>
> Den 19.06.2015 16:17, skrev Pieter Hintjens:
>
> I'd suggest you try again to debug the lvcache code, as it runs. It
> should be getting subscriptions from the subscriber.
>
> On Fri, Jun 19, 2015 at 3:37 PM, Ingar Pedersen <ifp.hj at online.no> wrote:
>
> Hi, I have been going through the greate guide, and running all the
> examples. However I'm getting stuck on the last value cache example... I
> have built all the source on linux and on windows and I'm getting the same
> result on both OS. I run the lvcache program, then the pathopub and finally
> pathosub. lvcache prints "sending cached topic xxx" but nothing is receive
> by the subscriber. I have debugged lvcache on widows (VS2012) and it seems
> nothing is received from the publisher ever... When I single step the
> publisher it seems all messages are dropped because there are no
> subscribers, but I am not to familiar with the source yet to be 100% sure
> about this... If I'm running without lvcache and using the 5556 port
> directly from publisher to subscriber it also works as expected. Now for the
> funny thing: If I build the C# example I'm getting the expected result, and
> all is built using the same libzmq... Any ideas why it fails when running
> with lvcache?? I have checked and tripple checked the setup, and I'm using
> tcp://127.0.0.1:5557 for the publisher and tcp://127.0.0.1:5558 for the
> subscriber... Thanks! best regards Ingar F Pedersen
> _______________________________________________ zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list