Saturday 18 July 2015

AEM : Implement Queue Using RabbitMQ

Nowadays having an application with high availability has become a need rather than an add-on to our infrastructure.
Queuing is one way of achieving high availability.  With help of a queue, you can push data to the queue and consumer would read message from the queue and do necessary processing. Even if the instance that pushed message to queue(the producer) goes down, other instance can read message(consumer) from queue and process it further.
There are various queuing options available - ActiveMQ, RabbitMQ, Kafka and lots more. For now I have used RabbitMQ for this.
To know more about RabbitMQ, you can refer documentation. Once you have RabbitMQ server up and running(default password for server is guest/guest), you can follow these steps to integrate it with AEM:
  • Add an entry to your POM

There are some transitive dependencies that need to be taken care of. For that make following changes to maven-bundle-plugin in the pom:


  • Using RabbitMQ API, you can push messages to the queue.
  • Create a consumer that listens to the queue
Refer my github repo for sample application for this. In this sample app, I have utilized RabbitMQ for "Asynchronous Email Sending".

So queue things up and ensure that your application has high availability. :)

P.S. : You can comment here or on github in case you need help.

Thanks!!!
Vivek Sachdeva
AEM Certified Expert
Certified_Expert_Adobe_Experience_Manager_Developer_badge

1 comment:

  1. Hi Vivek. I saw your profile on urbanpro, want to talk with you on AEM development. My contact number is 8861489182 (Delhi). Please call or whatsapp me, when you see this message.. thanks

    ReplyDelete