Search code examples
javajmsproducer-consumer

JMS (Java Message Service)


I was reading about JMS here and I thought "I've written a simpler consumer/producer before...". Am I being naïve about the power of JMS? I think something simpler is a better implementation of working through a Web Service to grab an XML document and pop it in a Queue. Is the approach I am taking incorrect?


Solution

  • If you dont need highly scalable and configurable distributed components with guaranteed delivery over multiple server crashes and automatic enrollment/commit/rollback in various transactions along with dead letter queue management, then yes a simple Queue with custom MessageProducer and MessageConsumer is probably a correct approach.

    The golden rule: if the complexity of implementing a simple solution using stack X nullifies the benefits of using stack X, don't use it.