Re: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up

2012-07-16 Thread Alex Sergeyev
This would be appropriate to commit:


--- a/examples/Perl/rrserver.pl
+++ b/examples/Perl/rrserver.pl
@@ -21,7 +21,7 @@ my $context = ZeroMQ::Context->new();

 # Socket to talk to clients
 my $responder = $context->socket(ZMQ_REP);
-$responder->connect('tcp://localhost:5560');
+$responder->bind('tcp://*:5559');

 while (1) {
 # Wait for next request from client


(localhost is ambiguous IPv6 vs IPv4, so I used * for simplicity)
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] ZMQ 2-x PUBSUB when router dies

2012-06-01 Thread Alex Sergeyev
Yeah, I'll probably go this way. The thing is that publisher did not
die, it's the router in-between them that gone away suddenly (crashed
in a way similar to unplugging it or separating network physically
without letting the endpoints know about it).

IMO tcp keepalive that you have in 3.1 could be helpful to deal with
situation like this in future.


Thanks!


Alex.


On Fri, Jun 1, 2012 at 5:20 PM, Pieter Hintjens  wrote:
> On Fri, Jun 1, 2012 at 9:37 PM, Alex Sergeyev  wrote:
>
>> One router core-dumped today. Subscriber behind it never realized that
>> it's time to reconnect and kept waiting for messages until I realized
>> that data is not there... Do you know what is the scenario of events
>> for such situation? How long would've that continued until anything
>> (OS or ZMQ) would've closed that socket?
>>
>> Should I have application - level fix for such situation or there is
>> some ZMQ socket option that I could've used?
>
> Normally if the publisher restarts, the subscriber socket will
> reconnect automatically. There is no 0MQ option for the subscriber to
> give up. You can add this quite easily... send a heartbeat if there is
> no other data going out, then if there's no heartbeat after a timeout,
> the subscriber knows the publisher is dead or frozen.
>
> -Pieter
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] ZMQ 2-x PUBSUB when router dies

2012-06-01 Thread Alex Sergeyev
Hi,

I have interesting observation which is probably could not be
addressed in ZMQ, just to confirm I'm not crazy and things should be
this way.

One router core-dumped today. Subscriber behind it never realized that
it's time to reconnect and kept waiting for messages until I realized
that data is not there... Do you know what is the scenario of events
for such situation? How long would've that continued until anything
(OS or ZMQ) would've closed that socket?

Should I have application - level fix for such situation or there is
some ZMQ socket option that I could've used?

-- 
Alex
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev