Note that there are some explanatory texts on larger screens.

plurals
  1. POMessage queue with random read\write access to queue elements before dequeing (rabbitmq or)
    primarykey
    data
    text
    <p>I use rabbitmq in Python via amqplib. I try to use AMQP for something more than just a queue, if that's possible - searching messages by ID, modifying them before dequeing, deleting from queue before dequeing. Those things are used to store/update a real users queue for a balancer, and that queue could be updated asynchronously by changing real user' state (for example, user is dead - his AMQP message must be deleted, or user changed it's state - and every such a change must be reflected in users' AMQP queue, in appropriate user's AMQP message) , and before the real dequeuing of a message happens. My questions are the following :</p> <ol> <li><p>Is there a way through amqplib to modify AMQP message body in some queueN before it would be dequed , searching it by some ID in it's header? I mean - i want to modify message body before dispatching it by receiver. </p></li> <li><p>Is there a way for a worker to pop excactly 5 (any number) last messages from queueN via amqplib? </p></li> <li><p>Can i asynchronously delete message from a queueN before it would be dequed, and it's neighbors would take it's place in the queueN? </p></li> <li><p>Which is the way for a message ID1 from queueN - to get it's real current queue position, counted from the beginning of the queueN? Does AMQP stores/updates for any message it's real queue position?</p> <p>Thanks in advance.</p></li> </ol> <p>UPDATE: according to rabbitmq documentation, there are problem with such a random access to messages in AMQP queue. Please advise another proper decision of a queue in Python, which supports fast asynchronous access to it's elements- searching a message by it's body, updating/deleting queue messages and getting fast queue index for any queue message. We tried deque + additional dict with user_info, but in this case we need to lock this deque+dict on each update, to avoid race conditions. Main purpose - is to serve a load balancer's queue and get rid of blocking when counting changes in queue.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload