spryker / message-broker
MessageBroker module
1.4.1
2023-02-08 11:59 UTC
Requires
- php: >=8.0
- spryker/kernel: ^3.30.0
- spryker/log: ^3.0.0
- spryker/message-broker-extension: ^1.1.0
- spryker/monolog: ^2.0.0
- spryker/symfony: ^3.10.0
- spryker/transfer: ^3.25.0
- spryker/util-encoding: ^1.0.0 || ^2.0.0
Requires (Dev)
Suggests
- spryker/ramsey-uuid: When the CorrelationIdMessageAttributeProviderPlugin is used you need to install this.
This package is auto-updated.
Last update: 2023-03-31 23:25:03 UTC
README
Wraps message in a Symfony Envelope and sends it through the configured transport. Starts a worker processes for the defined channels.
Installation
composer require spryker/message-broker
Documentation
Configuration example (config_x.php)
This is just an example for testing purposes and the real configuration will be made via env variables.
$config[MessageBrokerAwsConstants::SNS_SENDER_CONFIG] = [ 'endpoint' => 'https://sns.eu-central-1.amazonaws.com', 'accessKeyId' => '...', 'accessKeySecret' => '...', 'region' => 'eu-central-1', 'topic' => 'arn:aws:sns:eu-central-1:...:message-broker-test', ]; $config[MessageBrokerAwsConstants::SQS_RECEIVER_CONFIG] = [ 'endpoint' => 'https://sqs.eu-central-1.amazonaws.com', 'account' => '...', 'accessKeyId' => '...', 'accessKeySecret' => '...', 'region' => 'eu-central-1', 'queue_name' => 'message-broker-test', 'poll_timeout' => 5, 'queueUrl' => 'https://sqs.eu-central-1.amazonaws.com/.../message-broker-test', 'auto_setup' => false, ]; $config[MessageBrokerAwsConstants::CHANNEL_TO_SENDER_CLIENT_MAP] = [ 'payment' => 'sns', ]; $config[MessageBrokerAwsConstants::CHANNEL_TO_RECEIVER_CLIENT_MAP] = [ 'payment' => 'sqs', ]; $config[MessageBrokerConstants::MESSAGE_TO_CHANNEL_MAP] = [ PaymentMethodTransfer::class => 'payment', ]; $config[MessageBrokerAwsConstants::MESSAGE_TO_CHANNEL_MAP] = [ PaymentMethodTransfer::class => 'payment', ];