Skip to content

Commit

Permalink
Merge pull request #7896 from magento/MC-32147-mq-config
Browse files Browse the repository at this point in the history
Fix env.php code sample for message queue configuration
  • Loading branch information
jeff-matthews committed Oct 12, 2020
2 parents 6139fd2 + 45032f8 commit a6d4714
Showing 1 changed file with 26 additions and 23 deletions.
Expand Up @@ -46,36 +46,39 @@ Perform the following actions:
1. Decode the message using topic name taken from the `\Magento\Framework\MessageQueue\ConsumerConfigurationInterface`.
1. Invoke callback `Magento\Framework\MessageQueue\ConsumerConfigurationInterface::getCallback` and pass the decoded data as an argument.

## Override topic configuration
## Change message queue from MySQL to AMQP

The following sample introduces a runtime configuration that allows you to redefine the adapter for a topic.

```php
'queue' => [
'topics' => [
'customer.created' => [
'schema' => [
'schema_type' => 'object',
'schema_value' => 'string'
],
'response_schema' => [
'schema_type' => 'object',
'schema_value' => 'string'
],
'publisher' = 'default-rabitmq'
'product_action_attribute.update' => [
'publisher' => 'amqp-magento'
]
],
'config' => [
'publishers' => [
'product_action_attribute.update' => [
'connections' => [
'amqp' => [
'name' => 'amqp',
'exchange' => 'magento',
'disabled' => false
],
'db' => [
'name' => 'db',
'disabled' => true
]
]
]
]
],
'consumers' => [
'product_action_attribute.update' => [
'connection' => 'amqp',
],
'order.created' => [
'schema' => [
'schema_type' => 'object',
'schema_value' => 'string'
],
'response_schema' => [
'schema_type' => 'object',
'schema_value' => 'string'
],
'publisher' = 'default-rabitmq'
],
],
],
],
```

Expand Down

0 comments on commit a6d4714

Please sign in to comment.