Publish/subscribe is a method for wiring software components together. One component publishes data, and subscribers receive events containing the data. This decouples the components so they do not need to know about each other; and it allows for configuration to wire components together without recompiling code.
Questions tagged [pubsub]
65 questions
53
votes
4 answers
Ways to share DTO across microservices?
My scenario is as follows.
I am designing a system designed to receive data from various types of sensors, and convert and then persist it to be used by various front-end and analytics services later.
I'm trying to design every service to be as…

foxtrotuniform6969
- 799
- 1
- 7
- 9
33
votes
3 answers
How to implement a message queue over Redis?
Why Redis for queuing?
I'm under the impression that Redis can make a good candidate for implementing a queueing system. Up until this point we've been using our MySQL database with polling, or RabbitMQ. With RabbitMQ we've had many problems - the…

djechlin
- 2,212
- 1
- 15
- 26
11
votes
2 answers
How is the publish-subscribe pattern different from gotos?
My understanding is that Goto statements are generally frowned upon. But the publish-subscribe pattern seems to be conceptually similar in that when a piece of code publishes a message, it performs a one-way transfer of control. The programmer may…

jds
- 1,092
- 2
- 10
- 19
10
votes
1 answer
Diagramming messages on a service bus
I'm looking for a way to clearly diagram how multiple applications communicate via a service bus. The best I've come up with so far is a sequence diagram, but I really don't like that. Sequence diagrams necessarily relate some sort of sequence, and…

p.s.w.g
- 4,135
- 4
- 28
- 40
9
votes
2 answers
Relationship between RESTful URIs and PubSub topics
I am designing a system which fits quite nicely into a RESTful architecture. Users can navigate a resource hierarchy from a root node, each resource links to other resources, resources have URIs etc. In many ways this is very similar to 99% of the…

Schneider
- 271
- 2
- 7
7
votes
1 answer
Best way to notify the client in real time that their queue (e.g. SQS) job has finished?
Current Scenario
Our application allows users to upload (Amazon S3) and manage their files through our interface. Currently those users can download the files directly from S3/Cloudfront through our application.
Adding a Zip feature
We would like…

Slickrick12
- 173
- 1
- 5
6
votes
2 answers
Simple, permanent queue system with pub/sub for Node.js?
Highly related https://stackoverflow.com/questions/6021938/nodejs-many-clients-requests-through-one-socket
I'm investigating a robust message passing system for this application of mine. The easyest solution would be Redis pub/sub (it's simple,…

Claudio
- 221
- 2
- 6
5
votes
1 answer
pubsub with multiple instances of each consumer
I'm currently looking into setting up a publish subscribe messaging infra structure for our microservice based platform. The new setup is meant to replace our current kafka based one, with something that's a little easier to maintain. One reason…

vruum
- 161
- 4
5
votes
3 answers
Are imperative events an anti-pattern?
Are events which are intended to tell listeners to carry out explicit actions an anti-pattern?
Imagine a worker service which raises the event WorkStarted at its beginning and the event WorkFinised at its end.
These events convey information about…

Matthew
- 181
- 10
5
votes
4 answers
Design Patterns for Coordinating Change Event Listeners
I've been working with the Observer pattern in JavaScript using various popular libraries for a number of years (YUI & jQuery). It's often that I need to observe a set of property value changes (e.g. respond only when 2 or more specific values…

Kreegr
- 53
- 4
4
votes
1 answer
Pub-Sub pattern and instance replication
I am porting an event-driven architecture to a container environment (Docker) and I wonder how to take advantage of replication while using pub-sub: if I just increment replicas I end up with many process doing the same elaboration and I don't think…

Marco Stramezzi
- 665
- 2
- 6
- 16
4
votes
1 answer
What is a good diagrammatic way to represent async event communication between two systems?
What is a good diagrammatic way to represent asynchronous event communication between two systems (the pub sub model)? I am not looking for tools but more of a representation. Is it a sequence diagram, a swim lane diagram or some other?

Vikash Kodati
- 51
- 1
- 5
4
votes
3 answers
What scenarios are implementations of Object Management Group (OMG) Data Distribution Service best suited for?
I've always been a big fan of asynchronous messaging and pub/sub implementations, but coming from a Java background, I'm most familiar with using JMS based messaging systems, such as JBoss MQ, HornetQ, ActiveMQ, OpenMQ, etc. I've also loosely…

mindcrime
- 520
- 4
- 6
3
votes
1 answer
The publish-subscribe pattern: garbage-collecting old subscriptions
I've been studying distributed systems design, in particular the Udi Dahan's class. He talks about the publish-subscribe pattern as a common pattern in messaging-oriented designs. There's obviously a clear point in time when subscriptions to a…

liori
- 725
- 5
- 16
3
votes
1 answer
Publisher-Subscriber architecture with central registry
Problem description
Publisher-Subscriber architecture with a central registry where agents can either promote their capabilities or search for a given capability.
The project must be developed with C/C++. A GUI used to compose a chain of agents is a…

Dayrona
- 139
- 1