publish-subscribe

WCF - how to write a publisher\subscriber service that publishes only to specific clients?

匆匆过客 提交于 2019-12-11 03:23:09
问题 I am writing a WCF service in a Publish-Subscribe pattern. When someone publishes an event, I don't want to straight away send it to all the clients. I want to be able to, for each client, check if that client needs to be notified about that publish. Basically this will be done by accessing a database, and checking if that client has subscribed for that specific event with those parameters (cannot be done in advance, needs to be checked only against database). Currently I am working using

Get IP Address of DataWriter/Publisher on RTI DDS?

陌路散爱 提交于 2019-12-11 02:08:21
问题 I am using RTI DDS 5.2.3.17 and would like to get the IP address of the DataWriter/Publisher to add to some log messages. How would I go about doing this I am having some trouble in just forming the logic of what to do? 回答1: Accessing the IP address of a DataWriter is not possible in a standardized way. However, the RTI Context implementation by default uses the IP address as part of every Entity's Globally Unique Identifier (GUID). You can find more information about GUIDs and how to access

ZeroMQ: I want Publish–Subscribe to drop older messages in favor of newer ones

独自空忆成欢 提交于 2019-12-11 02:03:20
问题 I'm using ZeroMQ publish–subscribe sockets to connect two processes. The publishing process is a sensor, and has a much faster refresh rate than the subscription process. I want the subscription process to only use the most recent message in the queue — and ignore older messages altogether. I've tried setting a highwater mark on the subscriber, but that seems to drop newer messages rather than older. Is there a publish–subscribe pattern someone can direct me toward for this purpose? 回答1: read

google pub-sub setMaxMessages

吃可爱长大的小学妹 提交于 2019-12-11 01:59:07
问题 I'm using google pubsub to fetch messages synchronously com.google.pubsub.v1.PullRequest.Builder pullRequestBuilder = PullRequest.newBuilder().setSubscription(subscriptionName).setReturnImmediately(returnImmediately); if (maxMessages != 0) { pullRequestBuilder.setMaxMessages(maxMessages); } PullRequest pullRequest = pullRequestBuilder.build(); PullResponse pullResponse = (PullResponse)this.subscriber.pullCallable().call(pullRequest); return pullResponse.getReceivedMessagesList(); I saw in the

How to create/preconfigure durable subscriber(s) in activemq.xml so that these subscriptions are ready upon ActiveMQ starts up?

天大地大妈咪最大 提交于 2019-12-10 18:40:50
问题 How to create/preconfigure durable subscriber(s) in activemq.xml so that these subscriptions are ready upon ActiveMQ comes up? As if subscribers are in the offline state. We're expecting a fixed (yet configurable) number of known subscribers. Wanna buffer all msgs sent by the publisher starting day 1, in case not all subscribers are up. Not sure if this is a common scenario but thanks in advance for the help. 回答1: This is a really common use case. What you should actually be looking at is

Is it posible to hook redis before key expired

邮差的信 提交于 2019-12-10 16:40:07
问题 I have set an expiration value to a key in redis, and want to get the opportunity to run a piece of code before the key will be deleted by redis. Is it possible, and if so how...? Thanks 回答1: My solution was to create a new key, with the same name as the one I wanted to hook, only I added a prefix for it indicating it's a key for timeouts usage ("TO") - something like: set key1 data1 set TO_key1 "" expire TO_key1 20 In the example above, as soon as "TO_key1" will expire, it will notify my

Google Cloud Pub/Sub Retry Count

帅比萌擦擦* 提交于 2019-12-10 15:31:50
问题 We are moving from an unstable messaging queue service to Google's Pub Sub in NodeJS. It seems to work well but we would like to include error handling. We would like to limit the number of retries for a particular message, say 10 times in our test environment and 100 times in production. Now if a message fails 10 times (in test), instead of it sitting in our queue and continue to be processed and fail for 7 days we would like to move it to a separate error queue and send us an email. We

How to send / receive customize item payload on pubsub node

被刻印的时光 ゝ 提交于 2019-12-10 14:58:47
问题 How to send / receive customize item on pubsub node with payload, I am using qsmack lib. here is my code. StringBuilder strBuffer = new StringBuilder(); strBuffer.append("<x xmlns="); strBuffer.append("jabber:x:data"); strBuffer.append(">Test</x>"); String xml = strBuffer.toString(); SimplePayload item = new SimplePayload("test1111","pubsub_test_book", xml); // Publish an Item with payload leafNode.send(new PayloadItem<SimplePayload>("test123", item)); when I am trying to send payload item on

How do I create a publisher/subscriber model in Angular?

不羁的心 提交于 2019-12-10 14:13:00
问题 I've been playing with Angular and have been trying to find a way to use a pub/sub mechanism across the whole component tree. It seems that EventEmitter is only emitting an event that can be subscribed to one level up - but not more. Similarly, it only emits the events up the tree but now down. plunker The relevant code is here: class App { onAncestor($event) { console.log('in ancestor, decendent clicked',$event); } } ... class Entities { .... onParent($event) { console.log('in entities

android publish/subscribe pattern

一曲冷凌霜 提交于 2019-12-10 12:54:47
问题 Is there a publish/subscribe pattern in android? What I want to achieve is I have this class that can notify interested party of an event. Then the interested party can do whatever it needs. Coming from a .net microsoft world, this sort of thing are build in. Do android have something similar, or I have to write some thing like an observer pattern? 回答1: I think you are speaking in terms of passing events/messages among classes within your application. So this question probably goes down to