Hi there dcpetrov,

Whilst I am not familiar with the Net::AMQP::RabbitMQ particulars, is RabbitMQ your only option for MQ?

Many times I have found that most MQ needs can easily be handled in simpler ways. For example, in Postgres 9.5 onward incorporates "skip locked" which allows you to implement simple queues right on your database rather that incorporating yet another tool, especially not one written in Java (LOL, sorry I couldn't resist) Erlang (thanks Fletch for pointing out).

But seriously, if you happen to be using pg as your RDBMS already, or are a fan of KISS (not necessarily the rock band), PostgreSQL's native support to implement MQ can easily handle 10K TPS which is usually much more that you will need on most MQs. Not saying you can always replace a dedicated MQ system, but many times, there is rarely a need to implement a full fledged MQ. Moreover, lots of programming tasks could benefit from implementing more MQs but coders shy away because of the complexity and the need to incorporate yet another technology to your stack. For these situations, simple and native Postgres MQs are very apt.

E.g. you can implement a queue on any table, with any structure and pop it with a simple query like so (BTW works great on DBD:Pg):

delete from out_queue where id = (select id from out_queue order by id + for update skip locked limit 1) returning *

Here is a good introduction:
https://www.pgcon.org/2016/schedule/attachments/414_queues-pgcon-2016.pdf

If you are worried about performance of Pg in general:
https://akorotkov.github.io/blog/2016/05/09/scalability-towards-millions-tps/

There is also a specialized MQ on Pg called PGQ. I have never used it so can't comment more:
https://wiki.postgresql.org/wiki/PGQ_Tutorial

Finally, not sure if this is still maintained but I used this POE-based MQ system many years ago and it was quite good. IIRC you don't even need to know POE to use it:
https://metacpan.org/pod/POE::Component::MessageQueue


In reply to Re: Async Net::AMQP::RabbitMQ by ait
in thread Async Net::AMQP::RabbitMQ by dcpetrov

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.