This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Messenger
Fabien Potencier e980ce40e2 feature #28399 [Messenger] Add a SenderLocator decoupled from ContainerInterface (fabpot)
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
-------

e658e155aa [Messenger] added a SenderLocator decoupled from ContainerInterface
2018-09-08 14:31:58 +02:00
..
Asynchronous [Messenger] added a SenderLocator decoupled from ContainerInterface 2018-09-08 14:26:08 +02:00
Command Bus argument is a required option when multiple buses are defined 2018-08-28 11:10:33 +02:00
DataCollector Merge branch '4.1' 2018-07-26 10:59:12 +02:00
DependencyInjection [Messenger][Profiler] Trace middleware execution 2018-09-08 06:30:21 +02:00
Exception [Messenger] added a SenderLocator decoupled from ContainerInterface 2018-09-08 14:26:08 +02:00
Handler [Messenger] changed exceptions to use component's one 2018-09-08 08:36:06 +02:00
Middleware [Messenger][Profiler] Trace middleware execution 2018-09-08 06:30:21 +02:00
Tests feature #28399 [Messenger] Add a SenderLocator decoupled from ContainerInterface (fabpot) 2018-09-08 14:31:58 +02:00
Transport [Messenger] added a simple serializer 2018-09-08 14:14:59 +02:00
CHANGELOG.md [Messenger] added a SenderLocator decoupled from ContainerInterface 2018-09-08 14:26:08 +02:00
composer.json [Messenger][Profiler] Trace middleware execution 2018-09-08 06:30:21 +02:00
Envelope.php [Messenger] Activation middleware decorator 2018-05-20 13:30:39 +02:00
EnvelopeAwareInterface.php feature #26945 [Messenger] Support configuring messages when dispatching (ogizanagi) 2018-05-09 15:46:25 +01:00
EnvelopeItemInterface.php [Messenger] Don't make EnvelopeItemInterface extend Serializable 2018-08-24 15:12:11 +02:00
LICENSE added missing LICENSE file 2018-09-04 15:11:50 +02:00
MessageBus.php Ensure the envelope is passed back and can be altered 2018-05-09 15:46:48 +01:00
MessageBusInterface.php feature #26945 [Messenger] Support configuring messages when dispatching (ogizanagi) 2018-05-09 15:46:25 +01:00
phpunit.xml.dist [Messenger] Add a new Messenger component 2018-03-23 09:01:52 +01:00
README.md [Messenger] Add a new Messenger component 2018-03-23 09:01:52 +01:00
TraceableMessageBus.php [Messenger][Profiler] Show dispatch caller 2018-05-30 12:45:35 +02:00
Worker.php feature #26945 [Messenger] Support configuring messages when dispatching (ogizanagi) 2018-05-09 15:46:25 +01:00

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.

Resources