Closed christopherraa closed 6 years ago
Got some feedback from sri in the mojo irc-channel:
18:31 <@sri> mishanti1: any method that calls ->wait is wrong 18:31 <@sri> the user always decides when to use ->wait
Offending code is Mojo::RabbitMQ::Client::Consumer->start()
that is implement just so the consumer looks like the publisher, ref Mojo::RabbitMQ::Client::Publisher->publish()
. Perhaps it would be best to just remove start()
in the consumer as there really is no blocking implementation there? Keep start_p()
so that it is clear exactly what the implementation does?
What do you think @SPodjasek ?
You're right consumer is by design long-running-task so there'll be no blocking behavior. One should use client methods get
& get_p
to synchronously get messages from queue.
@SPodjasek So am I interpreting you correctly if I suggest that ->start()
should be removed in it's entirety?
@SPodjasek I have updated the fork with the changes in naming discussed yesterday. There are no tests for the functionality yet. If you want tests made I would greatly appreciate some guidelines from you on how you want the tests structured, plus to what extent you want tests.
@SPodjasek Any chance of getting this merged and moving closer to a new release? Are you waiting for anything from me?
@SPodjasek Updates?
With this change
Mojo::RabbitMQ::Client::Consumer
uses promises. Please note that this is a work in progress and this PR represent a request for comment. This change could possibly, if accepted, close inway/mojo-rabbitmq-client#12 and inway/mojo-rabbitmq-client#22 .