views:

37

answers:

4

I'm a big fan of using message queue systems(like Apache ActiveMQ) for the tasks which are rather slow and do not require instant feedback in User Interface.

The question is: Should I use it for other tasks(which are pretty fast) and do not require instant feedback in User Interface?

Or does it in involve another level of complexity without not so much benefits?

+1  A: 

Is it necessary for requests to be processed in the background, independent of other components in your application? If the answer is yes, I think it warrants a queue of some kind.

If you're processing them inline in your application, that just means your application has to be running to process them. If you want them to run on their own, then you need something else to process them. I don't think adding the queue is enough extra work to justify avoid it if your message processing needs to always be running.

rwmnau
Valuable advice too! Thanks
Fedyashev Nikita
+1  A: 

If you're already using a MQ system in your app, I would consider moving most non-synchronous tasks there. Any fire-and-forget or event driven task is a good candidate. But then, don't overdo it either, and I certainly wouldn't consider adding the dependency if you have no other use for MQ in the application.

Chris
+2  A: 

Well, if you think about it, Win32 is more or less built around message queues. That said, just because you have a hammer, doesn't make every problem a nail. Frankly though, it depends. Queues for example do not work well towards multiple receivers.

Serapth
A: 

The right tool for the job. Is a message queue the right tool for the job you have in mind?

Jay