publish-subscribe

Sharing Interfaces Between a WCF Service and Client (marked w/ ServiceContract)

有些话、适合烂在心里 提交于 2019-12-04 11:31:34
I'm using VS2010 and .NET 4.0. I've checked here ( Sharing Interfaces that are implemented in WCF Service ) but it differs in that what I'm trying to accomplish involves an interface that is marked with ServiceContract. I.e. in the service, I have an interface A (marked as a ServiceContract) and an extending interface B (also marked as a ServiceContract). B is implemented by the WCF service. The exact extension goes along the lines of this: public interface A<T> public interface B : A<SpecificType> ("SpecificType" is marked as a DataContract.) Obviously, B is exposed to the WCF client in the

RabbitMQ: How to specify the queue to publish to?

牧云@^-^@ 提交于 2019-12-04 10:49:39
问题 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 consume from. But Channel#basicPublish has no such equivalency: channel.basicPublish(exchangeName, routingKey, mandatory, immediateFlag, basicProperties, messageAsBytes); Why can't I specify the queue to publish to here?!? How do I get a Channel publishing

How to design redis pub/sub for an instant messaging system?

て烟熏妆下的殇ゞ 提交于 2019-12-04 07:33:54
问题 I am new to redis pub/sub. I have a chat facility in the system which is like IM. So I would like to use redis pub/sub. As I have examined the samples most of them are designed based on a chat room. In my system I will have multiple chat rooms between users like; A:B A:C D:C E:F So, the lines above are the rooms. And I have implemented the server with node.js like below; var store = redis.createClient(); var pub = redis.createClient(); io.sockets.on('connection', function (socket) { var sub =

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

旧街凉风 提交于 2019-12-04 05:33:09
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 the reason for this? Is the way the backend is connected correct? Is this pattern only supposed to

exact example for JMS Topic in HornetQ

独自空忆成欢 提交于 2019-12-04 05:11:00
问题 I read the hornetQ documentation, confused a lot. Can someone give an exact example to create a JMS topic in hornetQ. I mean the xml configurations in hornetq-jms.xml and hornetq-configuration.xml . assume we have a topic named top and 2 subscribers named: sub1 , sub2 . what I get is that we should define two queues(one for each subscribers) and bind them to an address which is the topic name actually, but how the subscriber would know they should connect to which one?(They only know the

Publish/Subscribe samples with RabbitMQ in .NET [closed]

帅比萌擦擦* 提交于 2019-12-04 04:00:35
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I've built this sample: Getting Started With RabbitMQ in .net , but made 2 programs: one-publisher one-subscriber I'm using BasicPublish to publish and BasicAck to listen as in example. If I run one publisher and several subscribers-on

Passing arrays via jQuery tiny PubSub

会有一股神秘感。 提交于 2019-12-04 02:24:10
问题 jQuery tiny PubSub is great when passing primitive values or objects, but has some trouble with arrays. So I have to wrap arrays into an object. (function($) { var o = $({}); $.subscribe = function() { o.on.apply(o, arguments); }; $.unsubscribe = function() { o.off.apply(o, arguments); }; $.publish = function() { o.trigger.apply(o, arguments); }; }(jQuery)); $.subscribe('test',function(e,data){ console.log(data); }) $.publish('test',1); //1 $.publish('test',{a:1}); //{a:1} $.publish('test',[2

Cofiguring an endpoint to act both as worker and subscriber

柔情痞子 提交于 2019-12-03 21:33:32
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 means, a worker have to be configured to receive messages from the distributor. I use the following

How to reject topic subscription based on user rights with Spring-websocket

时光怂恿深爱的人放手 提交于 2019-12-03 17:55:27
问题 I'm implementing a version of the stock application where the server able to reject topic subscription for certain topic based on the user rights. Is there a way in spring-websocket to do this? For example: In the stock example project we have price topic for 3 instrument: Apple, Microsoft, Google And have two user: User1, User2 User1 should have access to Apple and Microsoft User2 should have access to Google only If User1 subscribe to Google he should got rejected response, and message

Publish subscribe with nodejs and redis(node_redis)

旧时模样 提交于 2019-12-03 17:30:23
I am trying to build a generic publish/subscribe server with nodejs and node_redis that receives requests from a browser with a channel name and responds with any data that has been published too that channel. To do this, I am using long polling requests from the browser and dealing with these requests by sending a response when a message is received on a channel. For each new request, an obect is created for subscribing to the channel (if and only if it does not already exist). clients = {}; //when request comes in, clients[channel] = redis.createClient(); clients[channel].subscribe(channel);