Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] Update the messenger documentation#9727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@sroze
Copy link
Contributor

@srozesroze commentedMay 3, 2018
edited
Loading

@yceruto
Copy link
Member

This is enough to allow you to route your message to theamqp.

What about to add a note block before that about install/enable the Serializer component, to make AMQP transport available?

sroze reacted with thumbs up emoji

@ogizanagi
Copy link
Contributor

ogizanagi commentedMay 7, 2018
edited
Loading

Some more entries to add to the list :)

  1. Now that[Messenger] Support configuring messages when dispatching symfony#26945 is merged, examples should be updated to reflect the newEnvelope usage (SenderInterface::send(Envelope $envelope) and receivers's handler (function (?Envelope $envelope) instead offunction ($message)).
  2. We can mention theEnvelopeAwareInterface, how to write items and how to benefit from it in custom middlewares (+ mention existing items)
  3. middlewares config entry is renamedmiddleware (Rename middlewares to middleware symfony#27177)
  4. in the config, message buses names are the full service id you'll use ([FrameworkBundle][Messenger] Remove convention-based service id generation for buses symfony#27162)

messenger.rst Outdated
# Create buses
buses:
commands:~
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should be the full service name (and remove the note bellow)

messenger.rst Outdated

use Symfony\Component\Messenger\AbstractMessageBusDecorator;

final class CommandBus extends AbstractMessageBusDecorator
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Recommend binding the message bus variable name instead

@sroze
Copy link
ContributorAuthor

Now thatsymfony/symfony#26945 is merged, examples should be updated to reflect the new Envelope usage (SenderInterface::send(Envelope $envelope) and receivers's handler (function (?Envelope $envelope) instead of function ($message)).
We can mention the EnvelopeAwareInterface, how to write items and how to benefit from it in custom middlewares (+ mention existing items)

@ogizanagi could you send a PR for that? Has it's not been merged yet, I'd prefer to move it out of the scope of this PR.

@ogizanagi
Copy link
Contributor

Sure I'll do once this one is merged.

@sroze
Copy link
ContributorAuthor

@javiereguiluz@weaverryan could you have a look at this one? 🙏

messenger.rst Outdated
buses:
messenger.bus.default:
middleware:
# Works with the FQCN if the class discovery is enabled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Or if you just name your service after the FQCN manually. No need to mention this IMHO. It's still a service id. ^^

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I removed the use of the.-based service actually.

messenger.rst Outdated
# Or with some service name
-app.middleware.yours
Note that if the service is abstract, then a child service will be created per bus.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

then a different instance of service will be created per bus.? (more concrete for the user I think)

sroze reacted with thumbs up emoji
@srozesrozeforce-pushed therevamp-the-messenger-documentation branch from41bebe5 to3ffc785CompareMay 8, 2018 20:29
@srozesroze changed the title[Messenger] Revamp the messenger documentation[Messenger] Update the messenger documentationMay 8, 2018
messenger.rst Outdated

..note::

In order to use Symfony's built-in AMQP adapter, you will need the Serializer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

AMQP transport?

messenger.rst Outdated
messenger.bus.default:
middleware:
-"App\\Middleware\\MyMiddleware"
-"App\\Middleware\\AnotherMiddleware"
Copy link
Member

@ycerutoycerutoMay 8, 2018
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

single quote and single backslash to be concistent?

@weaverryanweaverryan changed the base branch frommaster to4.1May 9, 2018 14:07
@weaverryanweaverryanforce-pushed therevamp-the-messenger-documentation branch frombfa508b toc3c3528CompareMay 9, 2018 14:07
@weaverryan
Copy link
Member

Thank you@sroze!

@weaverryanweaverryan merged commitc3c3528 intosymfony:4.1May 9, 2018
weaverryan added a commit that referenced this pull requestMay 9, 2018
This PR was submitted for the master branch but it was squashed and merged into the 4.1 branch instead (closes#9727).Discussion----------[Messenger] Update the messenger documentation- [x]Fixes#9641 with the middleware configuration.- [x]Fixes#9617 with the multiple bus configuration.- [x] Change adapters to transports (waiting merge:symfony/symfony#27129)- [x] middlewares config entry is renamed middleware (symfony/symfony#27177)- [x] in the config, message buses names are the full service id you'll use (symfony/symfony#27162)- [x] Add TransportInterface as first class citizen sender+receiver (symfony/symfony#27164)Commits-------c3c3528 Few updates following review64bfd75 Change wording and don't use `.`-based services so it's just clearere1f3b5a Fix the formating of the method name9b7b85f Update the example of using multiple buses to use DI's `bind`sc76b2c2 Uses the full service name when configuring the buses from the YAML configuration2409798 Middleware does not have a plurala20286d Add a note about the symfony serializer pack10f46eb Introduce the `TransportInterface`ef70bc0 Add a documentation about the middlewares3ff8cfe Add multiple buses configuration and type-hint examplea4bc592 Rename the adapters to transport
@srozesroze deleted the revamp-the-messenger-documentation branchMay 9, 2018 14:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@ycerutoycerutoyceruto left review comments

@ogizanagiogizanagiogizanagi left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@sroze@yceruto@ogizanagi@weaverryan@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp