← Volver al índice de módulos

mqueue

The mqueue module offers a generic message queue system in shared memory for inter-process communication using the config file. One example of usage is to send time consuming operations to one or seve
🔀 Enrutamiento y Proxy SIP Kamailio 6.1 10 parámetros 8 funciones

Descripción general

The mqueue module offers a generic message queue system in shared memory for inter-process communication using the config file. One example of usage is to send time consuming operations to one or several timer processes that consumes items in the queue, without affecting SIP message handling in the socket-listening process. There can be many defined queues. Access to queued values is done via pseudo variables.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/mqueue.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/mqueue

Parámetros de configuración

ParámetroTipoDescripción
db_url str 3.2. mqueue (string) 3.3. mqueue_name (string) 3.4. mqueue_size (int) 3.5. mqueue_addmode (int)
mqueue string 3.3. mqueue_name (string) 3.4. mqueue_size (int) 3.5. mqueue_addmode (int)
mqueue_name string 3.4. mqueue_size (int) 3.5. mqueue_addmode (int)
mqueue_size int 3.5. mqueue_addmode (int)
mqueue_addmode int 3.1. db_url (str)
db_url str The URL to connect to database for loading values in mqueue table at start up and/or saving values at shutdown.
mqueue string Definition of a memory queue
mqueue_name string Definition of a memory queue, just by name.
mqueue_size int Definition of the size of all memory queues defined via "mqueue_name" parameter.
mqueue_addmode int Sets the mode to be used when adding a new (key,value) pair in the mqueue. * 0 Add all new (key,value) at the end of mqueue * 1 Unique key, keep oldest (key,value) * 2 Unique key, keep newest(key,valu

Funciones exportadas

mq_add(queue, key, value)

4.2. mq_fetch(queue) 4.3. mq_pv_free(queue) 4.4. mq_size(queue)

mq_fetch(queue)

4.3. mq_pv_free(queue) 4.4. mq_size(queue)

mq_pv_free(queue)

4.4. mq_size(queue)

mq_size(queue)

4.1. mq_add(queue, key, value)

mq_add(queue, key, value)

Add a new item (key, value) in the queue. If max size of queue is exceeded, the oldest one is removed.

mq_fetch(queue)

Take oldest item from queue and fill $mqk(queue) and $mqv(queue) pseudo variables.

mq_pv_free(queue)

Free the item fetched in pseudo-variables. It is optional, a new fetch frees the previous values.

mq_size(queue)

Returns the current number of elements in the mqueue.

Autores y contribuidores

Elena-Ramona ModroiuElena-Ramona Modroiu <ramona@asipto.com>Alex BalashovEvariste Systems <abalashov@evaristesys.com>Ovidiu Sas <osas@voipembedded.com>Julien Chavanton <jchavanton@gmail.com>

Copyright © 2010 Elena-Ramona Modroiu (asipto.com)
Copyright © 2018-2020 Julien chavanton, Flowroute

Módulos relacionados

acc acc_diameter acc_json acc_radius alias_db app_jsdt carrierroute cfgt