O'Reilly logo

Play Framework Cookbook - Second Edition by Giancarlo Inductivo, Alexander Reelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integrating a Play application with message queues

In this recipe, we will explore how to use Play 2.0 to integrate with IronMQ, a popular cloud message queue service. We will use IronMQ's Java libraries, which can be found here:

https://github.com/iron-io/iron_mq_java

We will use a Play plugin to initialize our IronMQ client and queue objects, and will expose helper methods to send and retrieve messages. We will then use this plugin in a Play controller that will allow clients to post messages and retrieve messages using the HTTP method, GET.

How to do it…

For Java, we need to perform the following steps:

  1. Run the foo_java application with Hot-Reloading enabled:
        activator "~run"
    
  2. Create an IronMQ account on http://www.iron.io/ and create an IronMQ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required