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:
- Run the
foo_java
application with Hot-Reloading enabled:activator "~run"
- Create an IronMQ account on http://www.iron.io/ and create an IronMQ ...
Get Play Framework Cookbook - Second Edition now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.