Self-hosted service
softwaremill/elasticmq avatar
softwaremill/elasticmq

ElasticMQ: an SQS-compatible queue for integration testing

In-memory message queue with an Amazon SQS-compatible interface. Runs stand-alone or embedded.

2,960 stars202 forksScalaApache-2.0

At a glance

What is it?
An in-memory Scala message queue with an Amazon SQS compatible REST interface, runnable stand-alone, in Docker or embedded in a test. Three settings decide what URL clients are handed back, two attributes in the queue block are test hooks rather than production settings, and the compose file runs floating image tags.
Who is it for?
ElasticMQ fits integration tests that need a real SQS endpoint without an AWS account, and the embeddable path is the reason it exists rather than the stand-alone server. Two things to accept before choosing it.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Scala, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • softwaremill/elasticmq2,960 ★ · +21
Star history
Repository2026-09-242026-11-22
softwaremill/elasticmq2.9k3k

21 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

At-least-once delivery is the stated goal, so the client has to be idempotent

The Summary section sets out the delivery semantics before anything else, and they are SQS semantics. Messages are received by polling the queue. A received message is blocked for a configured span, the visibility timeout, and if it is not deleted within that time it becomes available for delivery again. Queues and messages can both be configured to always deliver with a delay.

Then the paragraph that matters most, stated as a property of the design rather than a caveat: the focus is to make sure messages are delivered, and a message may be delivered twice. The example given is a client that dies after receiving and processing a message but before deleting it.

The consequence is stated too, and it is a consequence for your code: clients should be idempotent. That is the same rule Amazon SQS imposes, and a happy-path test alone may not reveal a client that assumes exactly-once delivery. Add explicit redelivery tests, for example by receiving a message without deleting it and allowing its visibility timeout to expire.

So the first question to ask about this queue is not throughput. It is whether the code under test can survive a redelivery.

A subset of the SQS query API, and one setting decides how strict the subset is

The compatibility claim is specific: ElasticMQ implements a subset of the SQS query REST interface. Not the whole thing. The stated uses for that are testing, on the grounds that ElasticMQ is easily embeddable, and building systems that work both inside and outside Amazon infrastructure.

The knob that governs the subset appears in the configuration sample as `sqs-limits`, with a comment naming two possible values, relaxed and strict. The shipped example sets it to strict.

code
rest-sqs {
  enabled = true
  bind-port = 9324
  bind-hostname = "0.0.0.0"
  # Possible values: relaxed, strict
  sqs-limits = strict
}

Nothing in the text says which of the two is the default, so a configuration that omits the line and one that sets strict are not the same thing, and the example file that the compose file mounts is not a neutral starting point. This is the setting to read first when a client behaves differently against ElasticMQ than against the real service, since it decides how close to the documented SQS limits this server holds itself.

The interface is also exposed two ways. The Summary describes an actor-based Scala implementation alongside the REST interface, which is what makes embedding in a Scala test suite practical.

Queue URLs come from node-address, and bind-hostname does not move them

Some responses include a queue URL, and by default those URLs are built from `http://localhost:9324`. The configuration separates the address clients see from the address the server binds to, and the distinction has a rule worth reading twice: changing `bind-port` and `bind-hostname` does not affect the queue URLs at all unless `generate-node-address` is true. When it is true, the bind host and port are used to build the node address, which is what you want when the port is assigned automatically, for example by using port 0, with the selected port then visible in the logs.

The `node-address` block carries the protocol, host, port and a context path. There is also a special value: setting `node-address.host` to `"*"` makes any queue URL created during a request use the path of the incoming request, which the README suggests for containerized deployments.

So the failure mode is quiet. The example configuration binds on all interfaces while advertising localhost, which is fine for a client on the same machine and wrong for anything reaching the server by another name. The same example ends its `queues` block with a comment cut off mid-word at `See next sectio`, so the block a reader is meant to copy stops before it shows a single queue.

copyTo and moveTo are declared as testing hooks, and both duplicate or divert every message

The queue definition block accepts more attributes than a queue needs. Alongside `defaultVisibilityTimeout`, `delay`, `receiveMessageWait`, `fifo`, `contentBasedDeduplication` and a `tags` map, there are `copyTo` and `moveTo`, each naming another queue. The README describes what they do plainly: all messages could be either duplicated, using `copyTo`, or redirected, using `moveTo`, to another queue, and it says this is useful primarily for integration testing scenarios.

Every attribute is optional, with two exceptions: `name`, and `maxReceiveCount` when a `deadLettersQueue` is defined. That last one is annotated in the example with its accepted range, from 1 to 1000, and it is the threshold at which a message is moved to the dead letter queue.

The example also shows why the target queues exist as empty blocks. `queue1` sets `copyTo = "audit-queue-name"` and a dead letter queue named `queue1-dead-letters`, and further down the same file both names appear as empty definitions, so the configuration has to declare the destinations whether or not they are configured.

The risk is straightforward: these two attributes are silent. A queue definition carried over from a test fixture into a deployment duplicates or diverts every message it receives without any error.

FIFO names get the suffix appended for you, so the configured name may not exist

FIFO behaviour is turned on with one parameter, `fifo = true`. The naming is the part with a wrinkle. You may add the `.fifo` suffix to the queue name yourself, and if you do, a name containing a dot has to be surrounded with quotes so the configuration parser does not read it as a path. The example shows that form:

code
queues {
  "testQueue.fifo" {
    fifo = true
    contentBasedDeduplication = true
  }
}

If you do not add the suffix, it is added automatically during queue creation.

That automatic append is worth planning around. The name in the configuration file and the name that exists afterwards can differ, so code that looks a queue up by the configured string can miss, and a queue created through the API rather than through configuration gets a suffix the configuration never mentions. Whether the suffix appears in the URL or the name is what decides this, and the README states only that it is added during creation.

`contentBasedDeduplication` appears in both FIFO examples and has no described default in the text available here.

Queues can be created on demand, with a template that silently becomes your defaults

Beyond the static queue list, ElasticMQ can create a queue the first time any request targets it, instead of returning a `NonExistentQueue` error. The stated benefit is the removal of the need to maintain a static list of queue names in the configuration, which is a development and testing convenience rather than a production feature.

Enabling it is one block, `auto-create-queues { enabled = true }`, and an optional `template` section supplies default attributes for every queue created this way. The template accepts the same attribute set as an explicit queue definition: a visibility timeout, a delay, a receive message wait, a dead letters queue with a name and a receive count, the FIFO and deduplication flags, the `copyTo` and `moveTo` targets, and a tags map.

All template attributes are optional. When the template is omitted, the system defaults apply, and the README lists them: a 30 second visibility timeout, zero delay, no dead letter queue, and standard values for the rest of the attributes, where that sentence stops mid-word at `stand`.

The point to notice is that a template silently becomes the configuration for every queue your tests invent, including the dead letter queue name. A queue created on demand with a template pointing at `my-dlq` behaves differently from one created with defaults, and nothing in the request distinguishes them.

The Issues link redirects, and compose uses latest image tags

The Community section has two links. Discussions and help go to the SoftwareMill community forum. The README links to `github.com/adamw/elasticmq/issues`, which redirects to `github.com/softwaremill/elasticmq/issues`. GitHub currently restricts new issue creation there; check the current repository guidance for how to report a problem.

The compose file starts two published images rather than building from this tree: `softwaremill/elasticmq-native:latest` for the server on port 9324, and `softwaremill/elasticmq-ui:latest` for the interface on port 3000. Both use the floating latest tag, so `docker compose up` on two different days can start two different versions.

The server service mounts `examples/elasticmq.conf` at `/opt/elasticmq.conf` and a named volume `elasticmq-data` at `/data`. The UI service is given `SQS_ENDPOINT` pointing at `http://elasticmq:9324`, so the interface talks to the API over the compose network by service name, and it declares `depends_on` the server without a condition, which means startup order is requested but readiness is not waited for.

The repository also contains a `ui/` module, so the interface exists in two places: built from this source tree, or pulled from a registry. Which one you get depends on the tag, not on the tree.

An sbt build with automated dependency updates and formatting kept out of blame

The build is sbt, with `build.sbt` at the root and a `project/` directory beside it. The modules are the pieces of the server: `core`, `rest`, `server`, `native-server`, `persistence` and `ui`, alongside the test projects `common-test`, `integration-tests` and `performance-tests`, and `examples/` holding the configuration and a logback file that the compose file mounts.

Two configuration files describe how the code changes over time. `.scala-steward.conf` is the config for Scala Steward, the service that opens dependency update pull requests, and `.scalafmt.conf` sets the formatter. A `.git-blame-ignore-revs` file sits next to them, which is how a project keeps formatting-only commits from rewriting the history that `git blame` reports.

The published artifact name appears in the README's badge: `org.elasticmq:elasticmq-rest-sqs_2.12`, so the Scala binary version is 2.12 and the module is the REST SQS interface rather than the whole server. Licensing is in `LICENSE.txt` with a separate `NOTICE.txt`, and the root also holds a `CLAUDE.md` for automated tooling and a `banner.png`.

The release shape is worth noting: v1.7.0 and v1.7.0-rc2 are both dated 2026-04-04, with the release candidate tagged about half an hour before the final, and v1.7.1 followed the next day. A candidate, its final and a patch landed inside roughly twenty-four hours.

Editorial conclusion

ElasticMQ fits integration tests that need a real SQS endpoint without an AWS account, and the embeddable path is the reason it exists rather than the stand-alone server. Two things to accept before choosing it. It implements a subset of the SQS query interface, and the `sqs-limits` setting decides how that subset is policed, so a client written against the full API may meet requests this server refuses. And delivery is at least once by design, with the README stating plainly that a message can be delivered twice and that clients must be idempotent, which is a property of your code and not something the queue can fix. On the operational side, note that queue URLs come from the `node-address` block and are unaffected by `bind-hostname` unless `generate-node-address` is turned on, and that the compose file in the repository starts the published native and UI images at their latest tags rather than a version you pin.

Frequently asked questions

what is elastic mq

An in-memory message queue system written in Scala, offering an actor-based implementation and an Amazon SQS compatible REST query interface. It runs stand-alone, through Docker, or embedded in a test, and it implements a subset of the SQS interface rather than all of it.

Is ElasticMQ a drop-in replacement for Amazon SQS?

It implements a subset of the SQS query REST interface, and a configuration setting named sqs-limits chooses between relaxed and strict, with the shipped example set to strict. Delivery follows SQS semantics with a visibility timeout, so a message can be delivered twice and clients should be idempotent.

How do I run ElasticMQ locally?

Clone the repository and run `docker compose up`. That starts the server on port 9324 and the web UI on port 3000, and the UI is at http://localhost:3000. The compose file mounts examples/elasticmq.conf as the server configuration and persists queue data in a named volume named elasticmq-data.

Does ElasticMQ store messages on disk?

The README describes ElasticMQ as an in-memory message queue system and lists queue persistence as an optional feature alongside the optional UI. The compose file mounts a named volume at /data, and a persistence module sits in the repository, but the text does not describe when persistence is enabled or what it writes.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. softwaremill/elasticmq on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/softwaremill-elasticmq.svg)](https://hysenlabs.com/projects/softwaremill-elasticmq)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/softwaremill-elasticmq.svg)](https://hysenlabs.com/projects/softwaremill-elasticmq)

Was this useful?