publish-subscribe

Does SignalR support the Publish/Subscribe messaging paradigm?

蓝咒 提交于 2019-12-05 23:15:52
I want to use pub-sub messaging between multiple servers in a web farm to maintain their local (ASP.NET) caches in sync. Could this be easily done with SignalR? If it is possible, how can I do so? 来源: https://stackoverflow.com/questions/9449601/does-signalr-support-the-publish-subscribe-messaging-paradigm

ZMQ: No subscription message on XPUB socket for multiple subscribers (Last Value Caching pattern)

徘徊边缘 提交于 2019-12-05 23:12:10
问题 I implemented the Last Value Caching (LVC) example of ZMQ (http://zguide.zeromq.org/php:chapter5#Last-Value-Caching), but can't get a 2nd subscriber to register at the backend. The first time a subscriber comes on board, the event[0] == b'\x01' condition is met and the cached value is sent, but the second subscriber (same topic) doesn't even register ( if backend in events: is never true). Everything else works fine. Data gets passed from the publisher to the subscribers (all). What could be

pubnub and head.js

ぃ、小莉子 提交于 2019-12-05 18:54:16
Has anyone managed to integrate pubnub and head.js properly? Pubnub expect me to put their script at the bottom of the page with a <div> tag just before it. This ensures that the ` tag is completely loaded by the time the javascript is called last. The thing is, the rest of my application and pubnub are loaded through head.js so it keeps happening that the JS files are loaded before the pubnub subscribe/publish key and its subscribing/publishing to 'demo' rather than my own area of pubnub... Is there any example anywhere or way for me to just screw off this <div> element and pass in the

MassTransit MSMQ Pub with multi-sub. When is RuntimeServices ready?

不打扰是莪最后的温柔 提交于 2019-12-05 18:39:49
I've set up a simple test comprising a publisher with two subscribers, all running on a single machine using MSMQ and MassTransit (2.1.1) RuntimeServices which is using a local Sql Server database. I've included the Bus set up code below so you can see what's set up. I'm starting each component manually and independently to try to workout what happens if a subscriber ins't running. I ran the two subscribers first so the queues and subscriptions are all set up and then quit them both, without unsubscribing from the messages. If I then run the publisher on its own, which dumps 400 messages in

Golang: Can I cast to chan interface{}

大憨熊 提交于 2019-12-05 18:22:49
问题 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 chan library.Object . I would like to be able to do something like: func (s *mySubscriber) Subscribe(addr string) chan interface{}{ ch := make(chan library.Object) library.Subscribe(addr, ch) return chan interface{}(ch) } Currently, I don't believe

How to make an EventEmitter listen to another EventEmitter in Node.js?

家住魔仙堡 提交于 2019-12-05 14:29:21
I want to do something like this: var events = require("events"); var emitterA = new events.EventEmitter(); var emitterB = new events.EventEmitter(); emitterA.addListener("testA", function(){ console.log("emitterA detected testA"); }); emitterB.addListener("testA", function(){ console.log("emitterB detected testA"); }); emitterA.emit("testA"); And the output to be this: emitterA detected testA emitterB detected testA But when I run this code, the output I get is: emitterA detected testA I basically want one emitter to listen to events emitted by another emitter. The Rationale: I'm writing a

Cofiguring an endpoint to act both as worker and subscriber

和自甴很熟 提交于 2019-12-05 09:52:44
问题 Is it possible to configure an endpoint to act as a worker retrieving jobs from a distributor AND subscribe to some kind of messages? I have the following scenario ( adapted to sale terminology) *) a central department publishes every now and then a list of the new prices. All workers have to be notified. That means, a worker should subscribe to this event. *) when a new order arrives at the central, it sends it to the distributor, which send it to the next idle worker to be processed. That

server push for millions of concurrent connections

假如想象 提交于 2019-12-05 09:30:49
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 / commmands will not be very high, maybe one message / sec / 1000 clients which means it would be 1000 msg/sec @ 1 million clients. => it's basically about the concurrent connections. The requirements are simple too. One way messaging (server->client), only 1 client per "channel". I am pretty open in terms of technology (xmpp / websockets / comet / ...). I am

Redis Pub/Sub ServiceStack, cancelling the thread

空扰寡人 提交于 2019-12-05 06:25:44
This maybe a more general threading question i'm not sure. But I've got a WPF app that subscribes to channels and listens for messages from a redis database. App.SubscriptionThread = new Thread(() => { _redisSubscription.SubscribeToChannels("ChannelA", "ChannelB"); }); App.SubscriptionThread.Start(); Once I start this I have no idea how to stop it. Things I've tried. Using the Thread.Abort . This apparently doesn't stop it, as the thread just goes into a hang then forever (no unsubscription happens). Using the _redisSubscription.UnSubscribeFromAllChannels() from the UI thread. This also causes

Redis vs Service Bus for pub/sub scenario

为君一笑 提交于 2019-12-05 04:10:08
I have several services in Azure and i would like to sync changes between them using some kind of pub/sub service. I am looking into Redis and Azure Service Bus. The data to be synced is very simple - mostly strings up to 100 characters I would like to know what is the preferred choice for me - or if i am in the right direction.. My requirements are simple: Low latency - Many small operations optional - be able to install the solution on-premise and not in Azure Don't use Redis for this. Redis PubSub isn't reliable (it's fire-and-forget ). What would happen if no one is listening when Redis