-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Consumers not showing in RabbitMQ admin?! #30259
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
It could happen if you use Docker, sometimes, the channel is created and never receive any message. This is due to a configuration issue:
Plus, when you use Problem is, what if you're looking at the logs? As far as I know from now, it could come from a configuration issue when you start RabbitMQ. |
Hi @Guikingone, thank you for your reply. So - the messenger library doesn't actually consume messages the "RabbitMQ-way". Hence the |
Ok, I understand the main problem. Maybe we can improve this feature by calling the correct method, @sroze don't know if it's something that we can improve? I can take a look if you want. |
Hi @makasim, thank you for the - this got my a good insight, why the current approach has been chosen. |
Thanks for the insight, i was wondering why my consumer does not appears in RabbitMQ |
My solution was adding my own RabbitMQTransportFactory and RabbitMQTransport.
|
The transport does not rely on So yes, that's by design. |
…up in the (rabbitmq) admin panel (smoench) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] Information about why consumers do not show up in the (rabbitmq) admin panel I wondered why the consumers were not shown up in the rabbitmq admin panel. I found following explanation symfony/symfony#30259 (comment) from @chalasr which should be documented. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 27339f2 [Messenger] Information about why consumers do not show up in the (rabbimq) admin panel
@chalasr Then it's not true consumer, that not visible in rabbit admin panel. You should design another command, that do what it should do -- report that it's consumer, be visible in admin panel but without those useless |
@garex Those "useless" options is the best we could provide with all concerns taken into account around the design of the component (which has been experimental for 3 minor releases before being considered stable and proven useful). Please keep in mind that nothing is owed here. Anyone can contribute and propose changes, you included. |
@chalasr do you have some links, where to research why you choosen only read-once model instead of read-always? |
https://www.cloudamqp.com/blog/2020-07-14-rabbitmq-basic-consume-vs-rabbitmq-basic-get.html https://www.rabbitmq.com/consumers.html#fetching
|
https://livebook.manning.com/book/rabbitmq-in-depth/chapter-5/11 |
Hello @chalasr The problem of consuming messages with the get method. If the consumer loses the connection, the message will remain permanently unacked. There is a possibility of data loss and i don't think --time-limit/--memory-limit features are a enough good reason to allow that. |
Could you elaborate? From the documentation (https://github.com/php-amqp/php-amqp/blob/df1241852b359cf12c346beaa68de202257efdf1/stubs/AMQPQueue.php#L155-L177) the message won't be acked, unless we call the |
With get method, it isn't, it stays unacked indefinitely, that's the problem. With pull, it return to ready state after the connection is lost. |
The redeliver_timeout option that has been added for doctrine and redis covers this issue. This is the behavior that is missing with get & rabbitmq. The pull method guarantees just this behavior. |
I did a quick/dirty example here https://github.com/Cafeine42/symfony/commit/e80ed72816b34712e026340cece3fb33477b709c
In the idea, all timeout and memory checks would only be performed at best upon receipt of a message. But the resilience of RabbitMQ would be preserved. |
Thanks @Cafeine42, Your implementation makes sense to me 🤔 |
Btw, don`t forget about hearbeat option. It could be useful and make sense
only in real-consume mode.
…__________________
Alexander Ustimenko
+7 (952) 918-02-20
ср, 31 мар. 2021 г. в 22:07, Gildas Quéméner ***@***.***>:
Thanks @Cafeine42 <https://github.com/Cafeine42>,
Your implementation makes sense to me 🤔
Any chance to have you submit a PR on the topic?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30259 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATBHOUN55ZBWOIU24GARDTGM3BXANCNFSM4GXW45OQ>
.
|
AFAIU, the problem is that In regards to heartbeat, from amqp-ext documentation:
This means that, when using this php extension, and when heartbeat has been configured in the amqp connection, then heartbeat frame will only be sent (if necessary) when calling methods like Is it correct? If so, I'm wondering if one should not prefer using a non-blocking IO solution (like this) to consume message through the Disclaimer: I am no expert in amqp protocol, nor in non blocking IO solution, so feel free to adjust my statements and take part in the conversation if I'm talking non-sense here! Plus, the issue is closed, so I am not sure it will ever reach any audience. |
Hi @gquemener I have created a bundle to implement this solution and i use it in production. I was planning on pushing a PR but got new priorities. It is still on my TODO list because I am very interested that this functionality be maintained over the long term but ... no ETA @garex The hearthbeat configuration should be accessible, in any case I saw a heartbeat parameter somewhere. The bundle https://github.com/Cafeine42/amqp-messenger |
I just encounter the issue where my messages are blocked with status "unacked". |
Would it possible to add an option in AMQP transport to use consume mod instead?
|
Or perhaps a non-blocking driver could be used instead? |
Symfony version(s) affected: 4.2.0 - 4.2.3
Description
When running the
messenger:consume-messages
command, the registered consumer(s) will not show in admin area of RabbitMQ, although the messages get consumed.That's the current state:

And this is how it should look like:

Is this an actual bug, is it by design or am I doing something wrong?
The text was updated successfully, but these errors were encountered: