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
6
votes
1 answer

How does the exponential backoff configured in Google Pub/Sub's RetryPolicy work?

The cloud.google.com/go/pubsub library recently released (in v1.5.0, cf. https://github.com/googleapis/google-cloud-go/releases/tag/pubsub%2Fv1.5.0) support for a new RetryPolicy server-side feature. The documentation…
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
6
votes
2 answers

nestjs global pubsub instance and dependency injection

I followed the Nestjs DOCS regarding pubsub/subsciprtions: According to the examples, pubsub is initialized at the top of a given resolver with: const pubSub = new PubSub(); later the docs say: "We used a local PubSub instance here. Instead, we…
baku
  • 765
  • 8
  • 22
6
votes
1 answer

Pubsub Java subscriber stopped receiving after a day of idling

I have a java code initiate a PubsubSubscriber with an executor Provider. It works for like 16 hr of idling. However, about 1 day of idling it stopped receive message from the subscription. If I restart the program it will go back to work again. I…
6
votes
3 answers

Problems with Inverted PUB/SUB with ZeroMQ

I'm trying to set up "inverted" PUB/SUB with ZeroMQ. Meaning that subscribing (SUB) sockets belong to several long-living servers, doing zmq_bind(); and publishing (PUB) socket is a short-lived client and does zmq_connect(). I use a single ipc://…
Alexander Gladysh
  • 39,865
  • 32
  • 103
  • 160
6
votes
2 answers

Advice on pubsub topic division based on geohashes for ably websocket connection service

My question concerns the following use case: Use case actors User A: The user who sets a broadcast region and views stream with live posts. User B: The first user who sends a broadcast message from within the broadcast region set by user A.…
html_programmer
  • 18,126
  • 18
  • 85
  • 158
6
votes
1 answer

NATS Request Reply - How it works?

I am new NATS. Not sure how NATS request reply works. As per my understanding, this pattern can be use for bi-directional communication but questions is, Does it works between same message id/thread ? If not, can't we use two different queue for the…
DSA
  • 720
  • 2
  • 9
  • 30
6
votes
1 answer

PubSub/Loosely Coupled & MVC patterns in Javascript

Ok, i'm a newbie in this, i've been trying to study MVC patterns and Publish/Subscription patterns in Javascript/jQuery, however i believe that i haven't grasped the concept entirely. Since i've been doing it alone, i humbly come here to ask for…
6
votes
1 answer

SubmissionPublisher on submit not invoking onNext of subscriber

Every interval I retrieve tweets with a certain query. These tweets have to be passed to services which calculate and manipulate those tweets. So these services are subscribed to my publisher. So publisher.hasSubscribers() returns true. But the…
user1008531
  • 491
  • 2
  • 8
  • 17
6
votes
2 answers

Is there a way to fully separate two redis databases for pub/sub usage?

Scenario: Two instances of an application share the same redis instance, but use different databases. The application makes use of the redis pub/sub functions to exchange data between services. Problem: When application instance A publishes…
tehsheri
  • 63
  • 4
6
votes
1 answer

Using Websphere MQ Topic .NET API

I read this article And still didn't understand the notion of how topics works in MQ. In JMS I know that you can publish a message on a Topic, and in order to receive a message from it you first need to subscribe to it (using the subscription name…
Guy
  • 915
  • 2
  • 14
  • 27
6
votes
1 answer

How does Facebook real time works?

I don't know how to formally state this question as i don't know what is actually happening here. Whenever any user comments on my post, facebook makes a request like below to display that comment without me doing anything.How do they do…
Sunil Kumar Jha
  • 841
  • 1
  • 8
  • 11
6
votes
3 answers

How to publish/subscribe a python “list of list” as topic in ROS

I am new to ROS and rospy, and I am not familiar with non-simple data type as topic. I want to build a ROS node as both a subscriber and publisher: it receives a topic (a list of two float64), and uses a function (say my_function) which returns a…
SGM
  • 151
  • 1
  • 10
6
votes
2 answers

Kafka topic per producer

Lets say I have multiple devices. Each device has different type of sensors. Now I want to send the data from each device for each sensor to kafka. But I am confused about the kafka topics. For processing this real time data Is it good to have kafka…
big
  • 1,888
  • 7
  • 28
  • 48
6
votes
1 answer

Why use Node.js EventEmitter instead of just a plain function?

Every article I read about node EventEmitters talks about how to create them. However, I have not seen a concrete example of why to use them instead of just a simple function. So for example , this is an example in a book I am reading of how to use…
William
  • 4,422
  • 17
  • 55
  • 108
6
votes
0 answers

Google pub-sub : Computing the queue size in a particular subscription

I have been dealing with Google pub-sub (using the python API) for some time now. I wanted to collect some metrics, specifically: (1) num_undelivered_messages (2) num_outstanding_messages I don't have access to a stackdriver account and I was hoping…
red_devil
  • 1,009
  • 2
  • 13
  • 23