Using ElasticMQ can’t get much simpler, just include the dependency and: (the code below is Scala, but it is just as easy to use from Java)
// First we need to create a Node val node = NodeBuilder.withInMemoryStorage().build() // Then we can expose the native client using the SQS REST interface val server = SQSRestServerFactory.start(node.nativeClient, 8888, "http://localhost:8888") // ... use: http://localhost:8888 exposes the full SQS interface ... // Finally we need to stop the server and the node server.stop() node.shutdown()
The 0.1 release contains support for all SQS actions, providing a fully-functional SQS replacement. A tiny fraction message attributes is still not supported (e.g.
Moreover, ElasticMQ will soon see its first production usage, serving as the messaging system behind one of the services we develop. The service used to be deployed on US-based servers, and it then successfully used the US-East SQS service. However, after moving the servers to Australia, as there’s no local AWS center, the communication delays with US and Singapore SQS servers became unacceptable; hence the need for a local SQS installation.