abalashov left a comment (kamailio/kamailio#4603)
@miconda LOL. Yeah, you're right about that, and certainly, I did not remember
that I wrote it! But I was thinking of the PV version, in `$mq_size(...)`,
which was added later, it seems to me. Before then, there was no way to examine
the size of the queue in config script, other than cumbersomely laundering it
through JSONRPC.
Now, in addition to limiting the size of the mqueue in the initial definition,
it is possible to dynamically adjust it based on certain circumstances:
```
if($mq_size(q) < $var(some_programmatic_thresh))
mq_add("q", "$var(headers)", "$var(payload)");
else
xinfo("Dropping due to queue overrun\n");
```
Then, on the other side, consume the queue in an rtimer process:
```
while(mq_fetch("q")) {
...
# If this is blocked, now it will be the rtimer worker blocked, not the
SIP worker.
evapi_relay(...);
}
```
If these assumptions expressed in the code are all correct, this might be a
satisfactory solution, @rennykoshy.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4603#issuecomment-3966414148
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4603/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!