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
7
votes
2 answers

NServiceBus: Could not find Metadata for (message)

I am attempting to publish a message as shown below _bus.Publish(new BatchCompleted { BatchId = batch.Id}); And handle it in a BatchCompletedHandler: public class BatchCompletedHandler: IHandleMessages { public void…
Tom Ferguson
  • 907
  • 1
  • 10
  • 26
7
votes
1 answer

Haproxy close connections to backup hosts when primary comes back

Question Can I get haproxy to close all connections to backup hosts when a primary host becomes available after being down? Context I am using HAproxy to do failover for pubsub. The haproxy backend config looks something like this: listen pubsub…
Nick
  • 900
  • 1
  • 10
  • 19
7
votes
2 answers

jQuery Callback and Pub / Sub

In the past I have done very simple pub / sub in jQuery by binding on the window. // subscribe $( window ).on("someEvent", function() { ... }); // publish $( window ).trigger("someEvent"); However I recently learned about the new callbacks…
user1031947
  • 6,294
  • 16
  • 55
  • 88
7
votes
4 answers

ZeroC ICE vs 0MQ/ZeroMQ vs Crossroads IO vs Open Source DDS

How does ZeroC ICE compare to 0MQ? I know that 0MQ/Crossroads and DDS are very similar, but cant seem to figure out where ICE comes in. I need to quickly implement a system that offloads real-time market-data from C++ to C#, as a first phase of my…
jaybny
  • 1,026
  • 2
  • 13
  • 29
7
votes
1 answer

Redis publishing when no subscriber

In Redis pub/sub if something is published when there is no subscriber, data is kind of lost. What i wanted is kind of notification to publisher when subscriber is subscribed. One way could be keep publishing in a loop and break the loop when…
amitchhajer
  • 12,492
  • 6
  • 40
  • 53
7
votes
2 answers

How to use jQuery .subscribe()?

I've been trying to use $.subscribe but it doesn't seem to work. I downloaded a WAR project where it does work but when I use this function in my project it doesn't work. Do I have to download an extra plugin? Because I couldn't find info about…
Diego Ramos
  • 989
  • 4
  • 16
  • 35
7
votes
1 answer

How do you configure multiple message consumers in MassTransit?

I'm looking at using MassTransit to publish a event from one process to all other processes that care about that event. In my environment, several processes that are subscribed to that event could be running on the same box. Based on the…
Andrew Theken
  • 3,392
  • 1
  • 31
  • 54
7
votes
2 answers

server push for millions of concurrent connections

I am building a distributed system that consists of potentially millions of clients which all need to keep an open (preferrably HTTP) connection to wait for a command from the server (which is running somewhere else). The load of messages /…
Daniel
  • 2,087
  • 3
  • 23
  • 37
6
votes
2 answers

Can an ASP.NET application handle NServiceBus events?

Most if not all of the NSB examples for ASP.NET (or MVC) have the web application sending a message using Bus.Send and possibly registering for a simple callback, which is essentially how I'm using it in my application. What I'm wondering is if it's…
Aaronaught
  • 120,909
  • 25
  • 266
  • 342
6
votes
1 answer

ZMQ Pub-Sub Program Failure When Losing Network Connectivity

I have a simple pub-sub setup on a mid-sized network, using ZMQ 2.1. Although some subscribers are using C# bindings, others are using Python bindings, and the issue I'm having is the same for either. If I pull the network cable from a machine…
jomido
  • 1,188
  • 1
  • 12
  • 17
6
votes
1 answer

Is publishing/subscribing to events after UI rendering a best practice regardless of framework?

I've inherited a rather large Javascript/ExtJS3 code base, and there are many instances of invoking events inside of the overridden initComponent method, after the call to "...superclass.initComponent.apply(this, arguments)". Specific events are…
Dexygen
  • 12,287
  • 13
  • 80
  • 147
6
votes
2 answers

How can I create an Rx observable which stops publishing events when the last observer unsubscribes?

I'll create an observable (through a variety of means) and return it to interested parties, but when they're done listening, I'd like to tear down the observable so it doesn't continue consuming resources. Another way to think of it as creating…
6
votes
1 answer

Redis / Node.js - 2 clients (1 pub/sub) causing issues with writes

Trying to create two clients; one is pub/sub, the other is a standard connection. Is this not possible? There must be a way to abstract this to work :) Basically, if I do a get key after running test.js, all I see is 'valueBefore'. The…
user375566
6
votes
1 answer

Service Bus - Am I being dumb?

I've been looking at Mass Transit for a couple of months now, and I'm really intrigued by the possibilities. However, I don't seem to be able to get the concepts quite right. I've looked the code, and I've gone through the documentation, but I just…
tbddeveloper
  • 2,407
  • 1
  • 23
  • 39
6
votes
3 answers

How to Separate IObservable and IObserver

Update: check out the example at the bottom I need to message between classes. The publisher will loop indefinitely, call some method to get data, and then pass the result of that call into OnNext. There can be many subscribers, but there should…