Questions tagged [pubsub]

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.

68 questions
57
votes
5 answers

Ways to share DTO across microservices?

I am designing a system 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 independent as possible, but I'm having…
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
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,102
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,215
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
  • 281
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…
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
5
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?
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
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
  • 191
  • 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…
4
votes
1 answer

Event bus vs PubSub

I have been using queues and PubSub patterns for years but never really came across the terminology "event bus". After some googling I didn't really find a clear distinction between "event bus" and "PubSub". Are they the same, just semantic…
Frankster
  • 189
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
  • 705
  • 2
  • 6
  • 16
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
  • 530
3
votes
0 answers

Broker queue and topic naming conventions

I'm in the process of adding a message broker (ActiveMQ Artemis) to a system currently and while I have my own notions on how I can divide up the namespace, it seems like a good time to get opinions from others on how they like to name their queues…
1
2 3 4 5