This example shows how to run the relayer with:
QUEUE_BACKEND=sqs- local SQS emulator (LocalStack)
- automatic queue + DLQ provisioning at startup
It is intended for local development/testing of the SQS queue backend.
- Docker
- Docker Compose
- Rust (for signer key generation)
git clone https://github.com/OpenZeppelin/openzeppelin-relayer
cd openzeppelin-relayerCreate a local signer keystore:
cargo run --example create_key -- \
--password <DEFINE_YOUR_PASSWORD> \
--output-dir examples/aws-sqs-queue-storage/config/keys \
--filename local-signer.jsonCreate .env:
cp examples/aws-sqs-queue-storage/.env.example examples/aws-sqs-queue-storage/.envThen set:
KEYSTORE_PASSPHRASEAPI_KEYWEBHOOK_SIGNING_KEY
Edit:
examples/aws-sqs-queue-storage/config/config.json
Set notifications[0].url to your webhook endpoint (for example from Webhook.site).
By default the example creates standard queues. To use FIFO queues instead, set INIT_SQS_QUEUE_TYPE=fifo in your .env file. The relayer auto-detects the queue type at startup.
docker compose -f examples/aws-sqs-queue-storage/docker-compose.yaml upServices started:
relayerredis(repository/locks)localstack(SQS emulator)sqs-init(creates required queues + DLQs and redrive policies)
curl -X GET http://localhost:8080/api/v1/relayers \
-H "Content-Type: application/json" \
-H "AUTHORIZATION: Bearer YOUR_API_KEY"The INIT_SQS_QUEUE_TYPE env var controls which queue type the init script creates:
standard(default) — higher throughput, native per-message delays, simpler setupfifo— message ordering per group, exactly-once delivery via deduplication
The relayer auto-detects the queue type at startup by probing a reference queue. No queue type configuration is needed on the relayer itself.
Main queues:
relayer-transaction-requestrelayer-transaction-submissionrelayer-status-checkrelayer-status-check-evmrelayer-status-check-stellarrelayer-notificationrelayer-token-swap-requestrelayer-relayer-health-check
DLQs:
relayer-transaction-request-dlqrelayer-transaction-submission-dlqrelayer-status-check-dlqrelayer-status-check-evm-dlqrelayer-status-check-stellar-dlqrelayer-notification-dlqrelayer-token-swap-request-dlqrelayer-relayer-health-check-dlq
Main queues:
relayer-transaction-request.fiforelayer-transaction-submission.fiforelayer-status-check.fiforelayer-status-check-evm.fiforelayer-status-check-stellar.fiforelayer-notification.fiforelayer-token-swap-request.fiforelayer-relayer-health-check.fifo
DLQs:
relayer-transaction-request-dlq.fiforelayer-transaction-submission-dlq.fiforelayer-status-check-dlq.fiforelayer-status-check-evm-dlq.fiforelayer-status-check-stellar-dlq.fiforelayer-notification-dlq.fiforelayer-token-swap-request-dlq.fiforelayer-relayer-health-check-dlq.fifo
FIFO queues are created with high-throughput mode (DeduplicationScope=messageGroup, FifoThroughputLimit=perMessageGroupId).
Redrive policy is configured automatically by sqs-init.
See the configuration docs for production provisioning details.