-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Making it Shine #30540
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is also needed imho #28849 |
Not sure if this was discussed before (searched GitHub but did not find what I was looking for) but I'm missing priority support. I think this is a crucial missing feature that Enqueue already provides (but not for all adapters). Things like user interaction (such as sending e-mails) should always have higher priority than other jobs so I really like that I can give a message a certain priority. I think with the current stamp concept it might be possible ( |
That is a great point. However, I think it is outside of the scope of the Messenger. We should however document how to achieve that. Quick howto: You add some AMQP routing metadata on your messages and make sure your transport supports adding the routing key to the AMQP message. Then you can configure your exchange to move some messages to a "high priority queue". Then you need to use a consumer that consumes from a list of queues. It sounds like a lot, but it is just "implementation details". |
So far, my list:
|
I've talked a little bit about this here: #29132 (comment) I tend to agree: the worker should not fail, and we should dispatch some events. Could you open a PR for this?
I don't understand this one - you can already fetch the return value from |
💯 I'd like to support (in all transports) a few common options, like priority, delivery delay, retry attempts, etc. Probably we should create a transport that can support all of these. We should propose this as soon as possible in a PR, because we need to get a few other transports merged AND make them support these before feature freeze at the end of March if we want to get things done for 4.3 (which I do). I've opened #30558 to discuss and have added to the list. |
I mean the result result of |
Please discuss this in another issue. |
I hadn't seen this issue, but is my PR could help ? #30454 |
@f2r Just added your PR to my list above. Indeed, I like where you're going with that PR :) |
@weaverryan is there something relatively easy I could start with? |
@antonch1989 how about null transport? Or maybe redis transport? |
Both of those have PR's already. However, reviewing and actually testing those would be an awesome way to start helping :). There aren't a lot of "easy pick" issues right now with this stuff. |
… (weaverryan) This PR was merged into the 4.3-dev branch. Discussion ---------- [Messenger] Worker events + global retry functionality | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | yes, on Messenger only | Deprecations? | no | Tests pass? | NEEDED | Fixed tickets | #29132, #27008, #27215 and part of #30540 | License | MIT | Doc PR | TODO This is an alternative to #29132 and #27008. There are several big things: 1) The `messenger:consume` does not die if a handler has an error 2) Events are dispatched before, after and on error a message being handled 3) Logic is moved out of Amqp and into the Worker so that we can have some consistent features, like error handling. 4) A generic retry system was added, which works with Amqp and future transports should support. It will work out of the box for users. Retrying works by putting the received `Envelope` back into the bus, but with the `ReceivedStamp` removed. The retry functionality has an integration test for AMQP. 5) Added a new `MessageDecodingFailedException` that transport Serializers should throw if `decode()` fails. It allows us to reject a message in this situation, as allowing it to fail but remain on the queue causes it to be retried forever. 6) A new `DelayStamp` was added, which is the first of (later) more stamps for configuring the transport layer (see #30558). BC breaks are documented in the CHANGELOG. Thanks! Commits ------- a989384 Adding global retry support, events & more to messenger transport
Small question, what about adding a This can really help for tests case. |
@Guikingone I would not add such a transport, which is very fragile. We already have Doctrine and in memory, I think that's more than enough. |
PDO/Doctrine and SQLite basically is filesystem. Why re-inventing the wheel? :) |
Enqueue has both 😄 In fact, the idea was to have a dedicated |
What do you think about allowing empty "type" headers to allow simpler message? |
That will be possible in 4.3 like this:
The Btw, about point (1), you should also implement the |
Closing this issue as incredible progress has been made on Messenger! Thanks for everyone who helped. Let's continue tracking individual items on new, individual issues. Cheers! |
Messenger is great. But, we've only carried it 90% of the way. It's missing key features and key things to really make it as usable as it deserves to be. Similar to #30502, I'd like to ask for help & ideas from the community to really make it shine.
(Note: in some of these cases, we just need more review & testing to help push PR's forward).
messenger.
#30670 make sure bus service ids are consistentmessenger:consume
has no output[RFC][Messenger] General message retry mechanism #27215[Messenger][AmqpExt] Add a retry mechanism for AMQP messages #27008) Retry mechanism[Messenger] Add "--force-consumption" option to force the consumption of messages #29132) Makingmessenger:consume
not fail when a worker fails[Messenger][RFC] Allow handler to choose the transport #30634 Possibly allow each handler of a message to be sent to a different transport (e.g. 1 handler async, 1 sync) and when received, only the 1 handler is executed.prefetching
for AMQP connection #30671 amqp prefetchWhat else?
The text was updated successfully, but these errors were encountered: