publish-subscribe

Can a Subscriber act as a Publisher?

核能气质少年 提交于 2019-12-08 08:47:19
问题 In terms of Reactive Streams, there is a Publisher and it could have as many Subscribers. But suppose, a subscriber gets a message from Publisher. Now this Subscriber(say Subs1) changes/modifies the message and passes it to some other Subscriber(say Subs2), which consumes the modified message. So can this Subs1 subscriber can act as a Publisher which can pass on message to new Subs2 subscriber? I am not sure if it possible or not, but the scenario is possible i think. If its possible, please

NServiceBus How To Publish Message From 2 Physical Locations Of 1 Logical Service

青春壹個敷衍的年華 提交于 2019-12-08 05:27:02
问题 is it possible to publish a message from 1 logical service that is deployed to 2 physical locations? how would the config file look like? you cannot add a message in your subscriber 2 times. but you must if you want to subscribe to 2 queues. 回答1: Yes, it's very possible. We're doing it right now. The trick is to have either a shared or replicated subscription store. Here's how it works: The subscription request (as defined in your subscriber's application configuration file) is sent to an

Modern alternative to publisher subscriber pattern

百般思念 提交于 2019-12-07 13:49:24
问题 I have a C++ Windows application. I am dealing with a publisher-subscriber situation, where one of my classes (publisher) generates data periodically and hands it off to another class (subscriber) which is constantly waiting to receive notification from the publisher. I am new to design patterns, and I looked up common implementations for publisher subscriber models, I noticed they are usually quite old, and they usually involve maintaining lists of pointers to objects. I was wondering if

Remove read topic from DDS

安稳与你 提交于 2019-12-07 13:15:49
问题 I have a problem with subscribing the data (using the java platform). When a subscriber subscribes to a topic, that subscribed data must be removed from the DDS. But in my case whenever I subscribe to the data the same data is subscribed many times. The data is not removed from the DDS. I tried with QoS but I don't know how to use it. Please suggest how I can remove the read data from the DDS. 回答1: This behavior is not caused by your QoS settings, but by your method of accessing the

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

送分小仙女□ 提交于 2019-12-07 09:31:57
问题 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

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

China☆狼群 提交于 2019-12-07 04:48:19
问题 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 being invoked on specific objects in a manner such as the following: this.filter.on('filterUpdated', function(filter, params) I've started converting the code to use a pub/sub paradigm instead, to reduce the coupling between objects and their specific

How to publish message in Google Pub/Sub from Firebase Cloud Function?

只愿长相守 提交于 2019-12-07 04:05:31
问题 I wrote a function that receive a http request and send a e-mail. But, I would like receive a http request and send a pub message. The problem is that the documentation is not clear. How I do that? This is my actual code. exports.weeklyEmail = functions.https.onRequest((req,res) => { const email = '****@gmail.com' console.log('Sending e-mail') const mailOptions = { to: email, from: '****@alunos.utfpr.edu.br', subject: 'Teste', text: 'Conteudo do email ' } mailTransport.sendMail(mailOptions)

Redis vs Service Bus for pub/sub scenario

孤人 提交于 2019-12-07 00:30:20
问题 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 回答1: Don't use Redis for this.

Using blocking REST requests to implement publish/subscribe

扶醉桌前 提交于 2019-12-06 20:04:11
问题 I've recently been asked to investigate the feasibility of integrating with a phone system vendor who wants to make phone events (e.g. line ringing, extension answered, call cleared) available using a RESTful web service. I pointed out that REST is a request/response protocol and they were doing publish/subscribe. The solution they were suggesting was to make an HTTP REST request which would block and then eventually respond if and when an event was available - or time out. Either way,

NServiceBus How To Publish Message From 2 Physical Locations Of 1 Logical Service

可紊 提交于 2019-12-06 16:33:32
is it possible to publish a message from 1 logical service that is deployed to 2 physical locations? how would the config file look like? you cannot add a message in your subscriber 2 times. but you must if you want to subscribe to 2 queues. Yes, it's very possible. We're doing it right now. The trick is to have either a shared or replicated subscription store. Here's how it works: The subscription request (as defined in your subscriber's application configuration file) is sent to an endpoint of the publisher. The publisher adds the request to its subscription store which is often a relational