Amazon SQS Support
Ecotone support for Amazon SQS PHP
Installation
composer require ecotone/sqsModule Powered By
Configuration
# config/services.yaml
Enqueue\Sqs\SqsConnectionFactory:
class: Enqueue\Sqs\SqsConnectionFactory
arguments:
- "sqs:?key=key&secret=secret®ion=us-east-1&version=latest"use Enqueue\Sqs\SqsConnectionFactory;
public function register()
{
$this->app->singleton(SqsConnectionFactory::class, function () {
return new SqsConnectionFactory("sqs:?key=key&secret=secret®ion=us-east-1&version=latest");
});
}use Enqueue\Sqs\SqsConnectionFactory;
$application = EcotoneLiteApplication::boostrap(
[
SqsConnectionFactory::class => new SqsConnectionFactory("sqs:?key=key&secret=secret®ion=us-east-1&version=latest")
]
);Message Channel
use Ecotone\Sqs\SqsBackedMessageChannelBuilder;
class MessagingConfiguration
{
#[ServiceContext]
public function orderChannel()
{
return SqsBackedMessageChannelBuilder::create("orders");
}
}Message Channel Configuration
Message Publisher
Publisher Configuration
Message Consumer
Consumer Configuration
Last updated
Was this helpful?