4 Replies Latest reply on Aug 14, 2014 12:39 PM by gangavh

    Dedicated AMQP Versus using @Async(Task Execution and scheduling)

    gangavh

      Hi Experts,

       

      We need to process REST service requests asynchronously as it involve file and DB operations.

       

      Service usage pattern is varying - can have burst of requests.

       

      To handle such scenarios, we need to queue requests for processing : not sure whether to use @Async of Spring framework or go for dedicated AMQP such as HornetQ.

       

      Thanks in advance.

        • 1. Re: Dedicated AMQP Versus using @Async(Task Execution and scheduling)
          clebert.suconic

          I'm not sure what's your question here. It sounds a consulting gig that would need some thought... you probably have all the variables to make a decision... but i don't know how to help you on such architectural decision without knowing your constraints.

          1 of 1 people found this helpful
          • 2. Re: Dedicated AMQP Versus using @Async(Task Execution and scheduling)
            gangavh

            Hi Clebert,

             

            Thanks for response.

             

            My question is more on whether to use HornetQ or use @Async which provide similar functionality. Concern is on scalability, performance.

             

            Use case is

            a. REST service gets called for sending email. Load expected is 70TPS and growing

            b. REST service calls service layer to persist requests

            c. Service layer will either put message in Queue or call Async processing and return immediately informing request is under process

             

            We are brainstorming on to use either @Async or use dedicated AMQP or AMQP will be overkill.

             

            Thanks in advance

            • 3. Re: Dedicated AMQP Versus using @Async(Task Execution and scheduling)
              jbertram

              As Clebert indicated, the questions your asking lend themselves more to a consulting engagement than a community forum.  You simply aren't providing enough detail to receive an educated response.  As far as I can see, there's lots of other considerations to think about, e.g.:

               

              1. What will the asynchronous task (whether trigger via Spring or HornetQ) actually be doing?  Will it be doing transactional work involving multiple resources (i.e. XA)?
              2. What should happen in the case of a failure?  Should the task be retried?
              3. Do you need high availability or clustering functionality?
              4. Why are you considering AMQP?  Why not JMS or simply HornetQ core?
              5. Do the REST end-point and the asynchronous task need to execute in the same JVM or can/should they be separated (e.g. for load-balancing)?

               

              That's just the stuff off the top of my head.

              1 of 1 people found this helpful
              • 4. Re: Dedicated AMQP Versus using @Async(Task Execution and scheduling)
                gangavh

                Hi,

                Thanks for the info, appreciate your consulting level guidance.

                Thanks,

                Ganga