I'm currently working on a series of alerts that will examine the status of a response from a foreign web service and send alerts based on the status of the the response object (for example timeouts, invalid data etc.). I want the main thread to continue working while the response is evaluated and alerts are sent.
I have two immediate options available to me:
- Use ActiveMQ and send the object as an objectMessage to the queue for processing.
- Use a command pattern and thread an asynchronous command that handles the alert.
They both seem like pretty good options to me but I'm leaning toward the threaded command since I don't need most of the features of a message queue.
Question: How would you decide which to use and why?