PHP code example of spryker / message-broker
1. Go to this page and download the library: Download spryker/message-broker library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
spryker / message-broker example snippets
$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',
];