Questions tagged [publish-subscribe]

Publish/subscribe is a messaging pattern where senders (publishers) of messages do not program the messages to be sent directly to specific receivers (subscribers). Rather, published messages are characterized into channels, without knowledge of what, if any, subscribers there may be.

Publish/subscribe is a messaging pattern where senders (publishers) of messages do not program the messages to be sent directly to specific receivers (subscribers). Rather, published messages are characterized into channels, without knowledge of what, if any, subscribers there may be. Subscribers express interest in one or more channels, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.

Among technologies known to implement the Publish/Subscribe pattern you can find :
( in a purely alphabetical order )

2940 questions
20
votes
2 answers

Redis Cluster vs ZeroMQ in Pub/Sub, for horizontally scaled distributed systems

If I were to design a huge distributed system whose throughput should scale linearly with the number of subscribers and number of channels in the system, which would be better ? 1) Redis Cluster (only for Redis 3.0 alpha, if its in cluster mode, you…
João Pinto Jerónimo
  • 9,586
  • 15
  • 62
  • 86
19
votes
1 answer

Redis PUBLISH/SUBSCRIBE limits

I'm considering Redis for a section of the architecture of a new project. It will consist of a lot of clients (node.js connections) SUBSCRIBING to particular keys with one process PUBLISHING to those keys as needed. I'm curious about the limits of…
mistagrooves
  • 2,337
  • 15
  • 16
19
votes
1 answer

RabbitMQ: Exchanges, queues and bindings - who does setup what?

When using RabbitMQ for sending messages you basically have exchanges, queues and bindings. I've understood their idea and how they relate to each other, but I am not quite sure who sets up what. Basically, I have three scenarios in my…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
18
votes
2 answers

Does the redis pub/sub model require persistent connections to redis?

In a web application, if I need to write an event to a queue, I would make a connection to redis to write the event. Now if I want another backend process (say a daemon or cron job) to process the or react the the publishing of the event in redis,…
codecompleting
  • 9,251
  • 13
  • 61
  • 102
18
votes
4 answers

lost messages on zeromq pub sub

I'm trying to implement the pub sub design pattern using zeromq framework. The idea is to launch a subscriber and afterwards to launch the publisher. The subscriber will listen to 100 messages and the publisher will publish 100 messages. So far so…
omer bach
  • 2,345
  • 5
  • 30
  • 46
18
votes
2 answers

Is there a GCP equivalent to AWS SQS?

Im curious to understand the implementation of GCP's PubSub. Although Pubsub seems to point to follow a Publish-Subscribe design pattern, it seems more close to AWS's SQS (queue) than AWS SNS (that use publish-subscribe model). Why is think this is,…
18
votes
1 answer

In Laymen's terms, what is Redis Pub/Sub?

Why would I use it? Give some very basic examples.
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
18
votes
2 answers

In microservices should i use pub/sub instead RPC to get more loosely couple architecture?

I current using a RPC call to another microservice via TCP and getting the response, but I think I can do it in this way: whithout make a RPC call, can I use a pub/sub to send to one service, publishing some channel like request_user and subscribed…
Augusto Will
  • 562
  • 7
  • 20
18
votes
3 answers

Celery as networked pub/sub events

I want to set up a network pub/sub event system but also needs to be able to run tasks asynchronously. I have tried getting celery to do the heavy lifting but I feel like I am trying to shim a whole bunch of things just to get it working. I have two…
Sam Churchill
  • 183
  • 1
  • 6
18
votes
2 answers

zeromq, C++, is it necessary to set a high water mark for subscribers?

I did a quick test of the ZeroMQ PUB/SUB and now have some working code. However, I am a bit confused about the concept of high water mark as applied in zeromq. I have set a HWM in my publisher code which sets a queue length for each subscriber…
user788171
  • 16,753
  • 40
  • 98
  • 125
18
votes
3 answers

Is there any recommended lightweight pubsub service/library?

I'm building a small system that contains many parts and I want to use a message pub/sub service to communicate between parts. I read about some message queue services like RabbitMQ and ZeroMQ but I feel they are too complicated and feel like it was…
Yoshi
  • 563
  • 1
  • 6
  • 17
18
votes
1 answer

ActionController::Live Is it possible to check if connection is still alive?

I'm trying to implement text/event-stream using Rails 4's Live streaming. It works great and the only trouble I met is that I can't check if the connection is alive without sending any messages. The only solution I figured out is to make supportive…
Ivan Yurov
  • 1,578
  • 10
  • 27
18
votes
1 answer

How to remove Redis on 'message' listeners

A typical Redis chat example will go something like this (see https://github.com/emrahayanoglu/Socket.io-Redis-RealTime-Chat-Example/blob/master/chatServer.js for just one such example): io.sockets.on('connection', function (client) { //websocket…
hrdwdmrbl
  • 4,814
  • 2
  • 32
  • 41
17
votes
1 answer

Are multiple responses legal in HTTP?

I'm a bit rusty on nuances of the HTTP protocol and I'm wondering if it can support publish/subscribe directly? HTTP is a request reponse protocol. So client sends a request and the server sends back a response. In HTTP 1.0 a new connection was made…
Bruce Adams
  • 4,953
  • 4
  • 48
  • 111
16
votes
3 answers

Real-time application newbie - Node.JS + Redis or RabbitMQ -> client/server how?

I am a newbie to real-time application development and am trying to wrap my head around the myriad options out there. I have read as many blog posts, notes and essays out there that people have been kind enough to share. Yet, a simple problem seems…
iUsable
  • 361
  • 3
  • 13