e980ce40e2
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Add a SenderLocator decoupled from ContainerInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | upcoming
For handler locators, we have a generic `HandlerLocator` class that takes a simple mapping instead of a service locator. The same did not exist for sender locators. So, this PR adds this possibility as well. That allows for something like this:
```php
new MessageBus([
new SendMessageMiddleware(new SenderLocator([
Message::class => new AmqpTransport($encoderDecoder, $encoderDecoder, $connection),
])),
new HandleMessageMiddleware(new HandlerLocator([
Message::class => new MessageHandler(),
])),
]);
```
Commits
-------
|
||
---|---|---|
.. | ||
Asynchronous | ||
Command | ||
DataCollector | ||
DependencyInjection | ||
Exception | ||
Handler | ||
Middleware | ||
Tests | ||
Transport | ||
CHANGELOG.md | ||
composer.json | ||
Envelope.php | ||
EnvelopeAwareInterface.php | ||
EnvelopeItemInterface.php | ||
LICENSE | ||
MessageBus.php | ||
MessageBusInterface.php | ||
phpunit.xml.dist | ||
README.md | ||
TraceableMessageBus.php | ||
Worker.php |
Messenger Component
This Component is experimental. Experimental features are not covered by Symfony's BC-break policy.
The Messenger component helps application send and receive messages to/from other applications or via message queues.