[zeromq-dev] Event-driven publish-subscribe model
Rajalakshmi Iyer
raj at blismobile.com
Mon Mar 26 13:52:31 CEST 2012
Hello,
I am working on a requirement whereby a process (say producer) needs to
send out one-way messages to a variable number of processes (say consumers).
The publish-subscribe model seemed good for this because the consumers will
subscribe to messages from the producer. I tried using ZeroMQ to achieve
this.
However, I have a few problems with it:
1.
The consumers have to continuously poll for messages. I would have the
consumers to be notified when there is a new message.
2.
There is a possibility of the producer queue being filled up. I would
have liked the producer to remove messages from the queue based on some
condition (say remove messages older than 5 seconds, or remove messages
that have been read 5 times). I see ZMQ recommends using a HWM, but I would
like more selective removal of elements from the buffer.
3.
Since the consumers are polling and the messages are not removed from
the queue, the consumers see duplicate messages till a new message comes
in. I want the consumer to be notified only once per new message.
I understand I may be using a wrong model (publish-subscribe may not be
suitable). I have thought about using request-reply, but that doesn't work
since the producer does not want to keep track of the number of consumers.
Can anyone suggest a good alternative?
Thanks in advance!
Raj
--
Twitter: @Blismobile <http://twitter.com/#!/blismobile>
BlisMobile Media
32 Percy Street,
London W1T 2DE
www.blismobile.com
[image: BlisMobile] <http://www.blismobile.com/>[image: Follow on Twitter]<http://twitter.com/#!/blismobile>[image:
Blis Website] <http://www.blismobile.com/>
This communication is from BlisMobile Media, which is a trading name of
Breeze Tech (UK) Ltd, a company registered in England and Wales with
registered number 06455773. Its registered office is 32 Percy Street,
London W1T 2DE, United Kingdom.
This communication contains information that is confidential and may also
be privileged. It is for the exclusive use of the intended recipient(s). If
you are not the intended recipient(s), please (1) notify info at blismobile.com by
forwarding this email and delete all copies from your system and (2) note
that disclosure, distribution, copying or use of this communication is
strictly prohibited. Email communications cannot be guaranteed to be secure
or free from error or viruses. All emails sent to or from a Blismobile
email account are securely archived and stored by an external supplier. This
email does not constitute a contractual agreement; such agreements are in
specified contractual or Insertion Order (IO) form only
and exclusively contain all the terms to which Breeze Tech )UK) Ltd will be
bound. To the extent permitted by law, Breeze Tech (UK) Ltd does not accept
any liability for use of or reliance on the contents of this email by any
person save by the intended recipient(s) to the extent agreed in a contract
or Insertion Order.
Opinions, conclusions and other information in this email which have not
been delivered by way of the business of Breeze Tech (UK) Ltd are neither
given nor endorsed by it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120326/cb1ba010/attachment.htm>
More information about the zeromq-dev
mailing list