envoylope / amqp-sqs-driver
AWS SQS driver for PHP AMQP-Compat
v0.1.0
2026-10-15 04:11 UTC
Requires
- php: >=8.1
- asmblah/php-amqp-compat: ^0.5.0
- aws/aws-sdk-php: ^3.385.3
- psr/cache: ^1|^2|^3
Requires (Dev)
- mockery/mockery: 1.6.11
- phpstan/phpstan: ^1.10
- phpstan/phpstan-mockery: ^1.1
- phpunit/phpunit: ^10.2
- symfony/cache: ^6|^7
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
AWS SQS driver for PHP AMQP-Compat.
Emulates AMQP concepts such as exchange routing on top of SQS.
Usage
Install via Composer:
$ composer require envoylope/amqp-sqs-driver
Then configure as the driver for PHP AMQP-Compat, e.g. if using Nytris platform:
nytris.config.php
...
use Envoylope\Amqp\Driver\Sqs\SqsDriver;
...
$bootConfig->installPackage(new AmqpCompatPackage(
...
driver: new SqsDriver(setup: ...)
));
...
Setup examples:
No warm-up needed when the topology cache is always populated:
$bootConfig->installPackage(new AmqpCompatPackage(
driver: new SqsDriver(
new ExistingSetup(
new SqsClient([...]),
new CacheBackedTopologyStorage(cache: new ArrayAdapter())
)
)
));
Usage with a warm-up callback (required when using a volatile cache):
$bootConfig->installPackage(new AmqpCompatPackage(
driver: new SqsDriver(
new ExistingSetup(
new SqsClient([...]),
new CacheBackedTopologyStorage(
cache: new ApcuAdapter(),
warmUp: function () use ($channel): void {
$exchange = new AMQPExchange($channel);
$exchange->setName('my-exchange');
$exchange->setType(AMQP_EX_TYPE_DIRECT);
$exchange->setFlags(AMQP_DURABLE);
$exchange->declareExchange();
$queue = new AMQPQueue($channel);
$queue->setName('my-queue');
$queue->setFlags(AMQP_DURABLE);
$queue->declareQueue();
$queue->bind('my-exchange', 'my-routing-key');
}
)
)
)
));