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

Redis PUB/SUB: how to ignore own messages?

The idea is: I have N WCF services which connected and subscribed to the same Redis message channel. These services use this channel to exchange messages to sync some caches and other data. How each service can ignore its own messages? I.e. how to…
ZedZip
  • 5,794
  • 15
  • 66
  • 119
8
votes
1 answer

Meteor: How should I update the Users collection to include a new attribute in the object / dictionary?

I've tried looking for an answer all over but cannot seem to get this working. I'm using Meteor with Cordova to build a mobile app. I want to add an attribute to my Users collection (the one Meteor creates when I'm logged in). ie. For example, I…
8
votes
1 answer

Simple pubsub with jQuery

Is there any reason why it would be against best practice to use jQuery's trigger and on methods as a cheap and easy pubsub? The following works: $(document).on('my:custom:event',function(){ alert('this is an event'); }); And…
philwinkle
  • 7,036
  • 3
  • 27
  • 46
8
votes
8 answers

What technologies are available for a publish/subscribe model using .NET?

I'm currently working on an application where one component of the application needs to interact with multiple other system components based on certain events. These events occur based on many different triggers... some events are caused by a…
mkedobbs
  • 4,327
  • 2
  • 23
  • 28
8
votes
2 answers

Nodejs: How to handle event listening between objects?

I currently have the problem that I have an object which should listen on another object. The question is: how should I handle the subscription? Currently, I only know of two possible ways: With registrator: var Registrator = function() { …
bodokaiser
  • 15,122
  • 22
  • 97
  • 140
8
votes
2 answers

comet vs pubsub..?

may i know what is the different between these 2 approach ? can explain in lay man terms?
cometta
  • 35,071
  • 77
  • 215
  • 324
7
votes
2 answers

Can an NServiceBus endpoint subscribe to multiple publishers of the same message?

I am developing a system to support receipt of status information from a variety of hardware types. Each piece of hardware is reporting the same status information (Latitude, Longitude), but each hardware type uses a unique protocol for reporting…
JadeMason
  • 1,181
  • 1
  • 14
  • 23
7
votes
2 answers

How do I list active subscribers using Faye?

I'm using Faye for dispatching messages and it works well. But I want to retrieve the active connections for a given channel, and things behave a bit differently: See "list active subscribers on a channel". I want to show the list of current users…
jpemberthy
  • 7,473
  • 8
  • 44
  • 52
7
votes
1 answer

Difference between Supply method act vs tap

In Raku documentation about the Supply method act (vs tap) https://docs.raku.org/type/Supply#method_act it is stated that: the given code is guaranteed to be executed by only one thread at a time My understanding is that a thread must finish with…
jakar
  • 1,701
  • 5
  • 14
7
votes
3 answers

How to use ServiceStack Redis in a web application to take advantage of pub / sub paradigm

I am interested in the Pub/Sub paradigm in order to provide a notifications system (ie : like Facebook), especially in a web application which has publishers (in several web applications on the same web server IIS) and one or more subscribers, in…
7
votes
3 answers

zero mq pub/sub with multipart not working

Here's my script. #!/usr/bin/env python import traceback import sys import zmq from time import sleep print "Creating the zmq.Context" context = zmq.Context() print "Binding the publisher to the local socket at port 5557" sender =…
bitcycle
  • 7,632
  • 16
  • 70
  • 121
7
votes
1 answer

AWS SNS subcriptions vs triggers on lambda function?

I have a question regarding the relationship between Lambda functions and Amazon SNS as a service. In SNS you create subscriptions to a topic, one being a Lambda function. In my head I'd imagine this is to invoke and trigger the function when a…
7
votes
3 answers

aws cli command to subscribe to a topic with filters

I'm trying to write a cross account aws cli command to subscribe to a topic and create a filter for that subscription at the same time. Below is how my command looks like. aws sns subscribe --topic-arn arn:aws:sns:region:accountId:my_topic…
7
votes
1 answer

How to subscribe a Redis channel from a React Component

How can I subscribe a redis channel inside a React Component when it is mounted (i.e, inside the componentDidMount() ) ? In the internet almost everywhere I see the redis implementation with nodejs but can't find any sufficient hints how to use…
Shamim
  • 635
  • 2
  • 12
  • 28
7
votes
2 answers

Skeleton Example for Swift Combine Publisher-Subscriber

As I port some Objective-C code to Swift, I'm trying to better understand the new Combine framework and how I can use it to re-create a common design pattern. In this case, the design pattern is a single object (Manager, Service, etc) that any…
kennyc
  • 5,490
  • 5
  • 34
  • 57