English 中文(简体)
is there a servicebus solution where consumers don t consume events? (multiple consumers receive same event)
原标题:

I was reading up on ActiveMQ which seems like a great implementation of a servicebus where producers can post messages and other processes can receive them.

However when reading the documentation, it looks like the producer has to give the endpoint when sending a message.

I would rather have it the other way around: My producer posts events import job starting , import job finished , etc and any consumer which is interested in certain classes of events can subscribe and receive these. However the consumer should not consume the event in that it doesn t get send to other subscribers anymore.

What would be the best product to have this kind of property?

Constraints: - It should have interfaces for at least .Net and php - It should work across machine boundaries

Thanks

最佳回答

I think you are currently publishing to a queue which typically means that 1 consumer would, well, consume the message and the event is handled. If you need to have more then 1 consumer receiving the events, you should use topics.

When using Topics, all subscribed consumers receive the event you have posted.

Take a look at this: http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html

问题回答

Don t know about the best, but I used D-Bus in project where was a task like yours. Check it s documentation.

References to implementations:

C# implementation of D-Bus

Binding of PHP and DBus

I hope it wuill help.

If you re ok with having the service hosted on the cloud, Microsoft s ServiceBus enables that scenario through it s Topic / Subscription model. Under this model, your producer sends a message to the Topic (a queue for all practical purposes), and anyone who s subscribed to it will get a copy of the message. For more advance scenarios, you can even create rules and filters to define which clients get which messages. There are both .NET and REST APIs for this.

You can check a full write up of the capabilities here. The doc includes sample code on how to use the client libraries for this. There also samples on how to use servicebus with Java and PHP, in case you need support for those languages.





相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签