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
8
votes
2 answers

Why can't I have a single Redis client acting as PUB and Sub in the same connection?

My mental model was that of a 'chat', where I am subscribed to a certain channel and I can publish messages to this channel.
Draconar
  • 1,147
  • 1
  • 17
  • 36
8
votes
1 answer

Rails pub/sub with faye

In a Rails app I've used Faye (Rack adapter) for push notifications (for chat). I want to use Faye for another use case (more push notifications) but I can't seem to figure it out. In my app a model can be created from a background job so I want to…
Seth Jackson
  • 539
  • 4
  • 16
8
votes
2 answers

Rate limit GCP Cloud Function triggers from pub/sub topic

I have a Cloud Function that is being triggered from a Pub/Sub topic. I want to rate limit my Cloud Function, so I set the max instances to 5. In my case, there will be a lot more produced messages than Cloud Functions (and I want to limit the…
8
votes
3 answers

Realtime web libraries - replace hookbox with socket.io or what?

I've got a couple projects that were built using hookbox to manage real-time message passing between web clients and servers. Hookbox was great -- it totally abstracted the transport layer, exposing a simple publish/subscribe interface across…
Leopd
  • 41,333
  • 31
  • 129
  • 167
8
votes
2 answers

How to route dead letter messages back to the original topic?

I have a Google Cloud Pub/Sub subscription that is using a dead-letter topic. I recently had an outage that was preventing a number of messages from being processed & they ended up in the dead-letter topic. The outage was resolved and I'd like to…
8
votes
1 answer

Long-running callback contract via WCF duplex channel - alternative design patterns?

I have a Windows service that logs speed readings from a radar gun to a database. In addition, I made the service a WCF server. I have a Forms and a CF client that subscribe to the service and get called back whenever there is a reading that…
cdonner
  • 37,019
  • 22
  • 105
  • 153
8
votes
1 answer

How to make one subscriber to process message (consider having more than one) in Radisson (redis-java client)

In my project , I've created a simple pub/sub topic with radisson (https://github.com/redisson/redisson) . Publisher will publish some message and there will be multiple subscribers running on different machines . When I publish , all the…
shashantrika
  • 1,039
  • 1
  • 9
  • 29
8
votes
2 answers

Using RabbitMQ (or pub/sub) for variables

I have an event (say activity) which may be active or not at a given time. I'm looking for a way to use RabbitMQ to figure if the event is active or not. I know the use case of RabbitMQ is pub/sub. How do I use RabbitMQ to be able to say if an event…
Alec Smart
  • 94,115
  • 39
  • 120
  • 184
8
votes
1 answer

Own pubsub implementation vs using addEventListener() + CustomEvent?

Is there a bigger difference between a self made pubsub system and what addEventListener() plus using new CustomEvent? Pseudocode implementation of pubsub (taken from here): // Publishing to a topic: events.publish('/page/load', { url:…
floriank
  • 25,546
  • 9
  • 42
  • 66
8
votes
4 answers

In a publish/subscribe model in microservices, how to receive/consume a message only once per service type

We are designing for a microservices architecture model where service A publishes a message and services B, and C would like to receive/consume the message. However, for high availability multiple instances of services B and C are running at the…
8
votes
1 answer

java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects when initializing pubsub on appengine

I try to run this code on appEngine (with java8 defined in my web.xml) public TopicName createTopic(final String topicNameStr) throws Exception { checkInit(); final TopicAdminSettings topicAdminSettings = …
8
votes
3 answers

Caused by: io.grpc.StatusRuntimeException: NOT_FOUND: Resource not found

I try to write a test of pubsub: @Test public void sendTopic() throws Exception { CustomSubscriber customSubscriber = new CustomSubscriber(); customSubscriber.startAndWait(); CustomPublisher customPublisher = new CustomPublisher(); …
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
8
votes
2 answers

Mediate and share data between different modules

I am just trying to get my head around event driven JS, so please bear with me. There are different kinds of modules within my app. Some just encapsulate data, others manage a part of the DOM. Some modules depend on others, sometimes one module…
Đinh Carabus
  • 3,403
  • 4
  • 22
  • 44
8
votes
2 answers

Gcm iOS, subscribe to topic, error code 3004

I'm trying to subscribe to a gcm topic on iOS. GCMPubSub.sharedInstance().subscribeWithToken(registrationId, topic: "/topics/mytopic", options: nil) { error in print(error.localizedDescription) } The operation couldn’t be completed.…
8
votes
3 answers

Redis Pub/Sub Ack/Nack

Is there a concept of acknowledgements in Redis Pub/Sub? For example, when using RabbitMQ, I can have two workers running on separate machines and when I publish a message to the queue, only one of the workers will ack/nack it and process the…
Richard Knop
  • 81,041
  • 149
  • 392
  • 552