Skip to content

Test against ElasticMQ instead of LocalStack - #111

Merged
lambdalisue merged 1 commit into
mainfrom
feat/elasticmq
Sep 7, 2026
Merged

lambdalisue merged 1 commit into
mainfrom
feat/elasticmq

Conversation

@lambdalisue

Copy link
Copy Markdown
Member

Closes #109.

Summary

  • Replace the LocalStack service with ElasticMQ (softwaremill/elasticmq-native:1.7.1) in CI and compose.yaml.
  • Move the SQS endpoint from 4566 to 9324 and the readiness probe from /_localstack/health to ListQueues.

Why

LocalStack merged its community and pro images, so every image published after that merge refuses to start without LOCALSTACK_AUTH_TOKEN. Pinning to 4.14.0 unblocked CI but freezes the SQS test environment at February 2026, and it will never receive fixes.

ElasticMQ is Apache-2.0, needs no account or token of any kind, and is an SQS server rather than an emulator of the whole of AWS — which is all this repository ever used LocalStack for. The image is also a fraction of the size, so CI containers start faster.

Details worth knowing

The readiness probe had to change, not just its port. SQS answers a bare GET / with 400 MissingAction, so the existing response.ok check would have reported ElasticMQ as unavailable and silently skipped every SQS test. ?Action=ListQueues answers 200 and needs no credentials, which keeps it a reachability check and nothing more.

The container healthcheck uses wget, not curl. Inspecting the image config shows it is alpine-minirootfs plus tini and the server binary — there is no curl in it. BusyBox wget is what is available. The image also exposes only 9324; there is no separate statistics or UI port, contrary to what #109 assumed.

Verification

ElasticMQ 1.7.1 was run locally and the real code exercised against it, rather than reasoning from documentation:

  • The SQS scenario passes end to end — all 11 steps, including message attributes, batch sends, long polling, delayed delivery and purge
  • Message attributes round-trip intact ({"priority":{"dataType":"Number",…},"type":{"dataType":"String",…}})
  • ensureQueue works, and queue URLs keep the same account-id shape as LocalStack (…/000000000000/test-queue), so nothing downstream had to change
  • deno task verify — 45 passed, 0 failed
  • CI green

Companion change

probitas-test/probitas-packages#25 does the same for the client package, where the SQS integration suite lives. The two are independent — this repository passes its endpoint explicitly — but they should land together so the whole project is off LocalStack.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E6iErRVYiy7LzNGLT5Vzh1

Copilot AI lite review requested due to automatic review settings September 7, 2026 15:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new ElasticMQ availability probe in the scenario setup does not validate HTTP success status, so it can incorrectly treat 4xx/5xx responses as “available” instead of skipping.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR migrates the repository’s SQS integration environment from LocalStack to ElasticMQ to avoid LocalStack’s new license/token requirement, updating both local development (Docker Compose) and CI (GitHub Actions) to use ElasticMQ’s SQS-compatible endpoint and a compatible readiness/health probe.

Changes:

  • Replace LocalStack with softwaremill/elasticmq-native:1.7.1 in compose.yaml and .github/workflows/test.yml.
  • Update the SQS endpoint port from 4566 to 9324.
  • Change the SQS readiness/health probe to ?Action=ListQueues (instead of /_localstack/health).
File summaries
File Description
probitas/13-client-sqs.probitas.ts Updates scenario endpoint port and replaces the LocalStack health check with an SQS ListQueues probe.
compose.yaml Swaps the localstack service for elasticmq, updates port mapping, and replaces the container healthcheck with a wget-based SQS probe.
.github/workflows/test.yml Replaces the LocalStack CI service with ElasticMQ across jobs and updates the service healthcheck to use the SQS ListQueues probe.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread probitas/13-client-sqs.probitas.ts
LocalStack merged its community and pro images, so every image published after
that merge refuses to start without LOCALSTACK_AUTH_TOKEN. The pin to 4.14.0
bought time but freezes the SQS test environment at February 2026 and will
never receive fixes.

ElasticMQ is Apache-2.0, needs no account or token, and is an SQS server rather
than an emulator of all of AWS — which is all this repository ever used
LocalStack for. Its image is also a fraction of the size, so CI starts faster.

The endpoint moves from 4566 to 9324 and the readiness probe from LocalStack's
/_localstack/health to ListQueues. SQS answers a bare GET with 400 because it
wants an Action, so probing the endpoint itself would read as unavailable;
ListQueues needs no credentials, which keeps the probe a reachability check.
The container healthcheck uses wget rather than curl because the image is
Alpine plus the server binary and has no curl.

Verified against ElasticMQ 1.7.1: the SQS scenario passes end to end, including
message attributes, batch sends, delayed delivery and purge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6iErRVYiy7LzNGLT5Vzh1
@lambdalisue
lambdalisue merged commit 5496d6b into main Sep 7, 2026
4 checks passed
@lambdalisue
lambdalisue deleted the feat/elasticmq branch September 7, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace LocalStack with ElasticMQ for SQS tests

2 participants