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

keeping a wcf callback channel open indefinitely / reconnecting from client if it faults

i'm currently trying to set up something like this: a server side windows wcf service hangs out and listens via tcp for connections from a client side windows service. when a connection is received (the client calls the CheckIn method on the…
Joshua Evensen
  • 1,544
  • 1
  • 15
  • 33
16
votes
1 answer

Update singleton HashMap using Google pub/sub

I have a use case where I initialise a HashMap that contains a set of lookup data (information about the physical location etc. of IoT devices). This lookup data serves as reference data for a 2nd dataset which is a PCollection. This PCollection is…
Chris Halcrow
  • 28,994
  • 18
  • 176
  • 206
16
votes
2 answers

Handling dropped clients in a duplex binding WCF application

We are using a pub-sub model in our WCF application that pretty much follows the Microsoft sample: Design Patterns: List-Based Publish-Subscribe. Whilst the service provides a notion of subscribe() and unsubscribe(), what is the best practice to…
Pero P.
  • 25,813
  • 9
  • 61
  • 85
16
votes
1 answer

Designing a REST API with req/resp and pub/sub requirements

Nowadays I'm designing a REST interface for a distributed system. It is a client/sever architecture but with two message exchange patterns: req/resp: the most RESTful approach, it would be a CRUD interface to access/create/modify/delete objects in…
user4384744
16
votes
1 answer

Sails.js simple private messaging (pub/sub and models)

My Goal: Create a private messaging platform using Sails.js with the simplest code possible Assumptions of Best Practices: Use Sails.js Webockets for realtime notifications Use Sails.js PubSub for DB use with websockets Use Sails.js .watch() to…
smileham
  • 1,430
  • 2
  • 16
  • 28
16
votes
3 answers

Golang: Can I cast to chan interface{}

I am trying to write a general purpose wrapper for subscriptions, something like: type Subscriber interface{ Subscribe(addr string) chan interface{} } Suppose there is a library I want to use which has a subscribe method in it, but which uses a…
Ethan
  • 1,057
  • 1
  • 14
  • 23
16
votes
3 answers

RabbitMQ: How to specify the queue to publish to?

RabbitMQ's Channel#basicConsume method gives us the following arguments: channel.basicConsume(queueName, autoAck, consumerTag, noLocal, exclusive, arguments, callback); Giving us the ability to tell RabbitMQ exactly which queue we want to…
user1768830
16
votes
3 answers

Publish / Subscribe pattern in SQL

Background: We have a large (15+ million) table of items which is updated frequently throughout the day (average 300K daily changes). Pending changes are stored in a staging table, and a job runs throughout the day to read changes from this table,…
Bort
  • 7,398
  • 3
  • 33
  • 48
16
votes
2 answers

Redis Pub-Sub or Socket.IO's broadcast

I saw this snippet: On Server io.sockets.on('connection', function(socket) { const subscribe = redis.createClient(); const publish = redis.createClient(); socket.on('publish', function(channel, data) { publish.publish(channel, data); …
Sơn Trần-Nguyễn
  • 2,188
  • 1
  • 26
  • 30
15
votes
2 answers

Are Qt's signals and slots a form of publish-subscribe?

I don't think I've seen this comparison anywhere, but would they be considered the same? If not, why not?
jzepeda
  • 1,470
  • 2
  • 15
  • 22
15
votes
2 answers

How to implement a light pub-sub service on App Engine?

During his Google I/O 2009 "Offline processing on App Engine: A look ahead" presentation (video, slides), Brett Slatkin presents the Task Queue service. He states that Pub-sub systems maximize transactions, decoupling: Large numbers of small…
nulltoken
  • 64,429
  • 20
  • 138
  • 130
15
votes
2 answers

Handling multiple event dependency in event-driven architecture

What would be best practice if you have an event-driven architecture and a service subscribing to events has to wait for multiple event (of the same kind) before proceeding with creating the next event in the chain? An example would be a book order…
Patrick
  • 1,044
  • 1
  • 10
  • 18
15
votes
1 answer

Redis pub/sub on rails

Following the Redis Pub/Sub this works fine and i can publish messages in any class using $redis.publish 'channel', { object: @object.id } using redis-cli > MONITOR, I can verify that this request was published correctly [0 127.0.0.1:64192]…
a14m
  • 7,808
  • 8
  • 50
  • 67
15
votes
1 answer

Redis queue vs MSMQ

For a long time we were using msmq and redis queue (IRedisList). Couple of month ago we started trying redis pub-sub . Our application has more than twenty services that read messages from queue or subscribe to channels with redis . We also have…
FelProNet
  • 689
  • 2
  • 10
  • 25
15
votes
5 answers

Redis publish/subscribe: see what channels are currently subscribed to

I am currently interested in seeing what channels are subscribed to in a Redis pub/sub application I have. When a client connects to our server, we register them to a channel that looks like: user:user_id The reason for this is I want to be able to…
randombits
  • 47,058
  • 76
  • 251
  • 433