[zeromq-dev] questions about sub/pub socket

Guo, Yanchao Yanchao.Guo at sac.com
Tue Feb 2 10:22:57 CET 2010

Hi Martin:

Out setup is like this:

We have a machine which is not inside our network, let us call it server; we have a machine inside our network, let us call it client. The client application will receive status from server, for that we have the the server binding to a IP/PORT and publishing message, and the client application connect to that IP/PORT and subscribing message. That works fine. 

However, the client application should be able to send cmd to the server application based on the received status. So for that, we need to have the server bind to another IP/PORT and subscribing message, the client application will connect to that IP/PORT and publishing message. That is where we are having problem, We don't want the the server receive "old" command messages.

Any suggestions? 


-----Original Message-----
From: Martin Sustrik [mailto:sustrik at 250bpm.com]
Sent: Tue 2/2/2010 4:15 AM
To: Guo, Yanchao
Cc: zeromq-dev at lists.zeromq.org
Subject: Re: [zeromq-dev] questions about sub/pub socket
Martin Sustrik wrote:
> Guo, Yanchao wrote:
>> Hi Martin:
>> Actually I want to AVOID the situation that message are cached in the 
>> publisher when the subscriber disconnected. However, with the 
>> PUB/Connect type of socket that I described below, the message is cached 
>> by default when the SUB is disconnected. I am asking is there a way to 
>> make this NOT happen.
> Ok. This shouldn't happen. Let me check it.

Ah. I see. It's PUB socket and you do connect on it. Yes, it that case 
it works that way. Normally the clients (SUBs) do connect and server 
(PUB) is doing bind. Can you be more specific about your use case?


DISCLAIMER: This e-mail message and any attachments are intended solely for the use of the individual or entity to which it is addressed and may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and permanently delete this message and any attachments. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100202/82c69303/attachment.htm>

More information about the zeromq-dev mailing list