1.1. KDMQ Request The DMQ module implements a distributed message queue on top of Kamailio in order to facilitate data propagation and replication between multiple instances, referred as "nodes" (or "peers"). The DMQ data flow between nodes is grouped in a logical entity referred as "channel" (or "bus"), many flows (channels) can be active at the same time. The communication between the nodes is done using SIP messages, after all Kamailio's best ability is routing SIP traffic, therefore reusing the same protocol empowers DMQ cluster with flexible routing policies, advanced authorization and security policies, a.s.o. DMQ sends SIP requests using the KDMQ request method (a custom method type specific to Kamailio, compliant with SIP specifications RFC3261). Data can be sent to all the other active nodes (aka "broadcast") or to a specific single node (aka "unicast"). The nodes can utilize the DMQ channels to pass messages between them to distribute data for various services (e.g., cached items, location records, active calls, ...). This grouping of messages on channels (per service) is similar to the topic concept in a typical pub/sub system. The channel name appears in the R-URI username part of KDMQ requests. The DMQ cluster transparently deals with node discovery, availability, consistency, retransmissions, etc. A new node can join the DMQ cluster by sending an availability notification to an existing node in the clusters. Nodes that are not responding to KDMQ reguests are rem
| Parámetro | Tipo | Descripción |
|---|---|---|
| server_address | str | 3.2. server_socket(str) 3.3. notification_address(str) 3.4. notification_channel(str) 3.5. multi_notify(int) 3.6. num_workers(int) 3.7. worker_usleep(int) 3.8. ping_interval(int) 3.9. remove_inactive( |
| server_socket | str | 3.3. notification_address(str) 3.4. notification_channel(str) 3.5. multi_notify(int) 3.6. num_workers(int) 3.7. worker_usleep(int) 3.8. ping_interval(int) 3.9. remove_inactive(int) 3.10. fail_count_en |
| notification_address | str | 3.4. notification_channel(str) 3.5. multi_notify(int) 3.6. num_workers(int) 3.7. worker_usleep(int) 3.8. ping_interval(int) 3.9. remove_inactive(int) 3.10. fail_count_enabled(int) 3.11. fail_count_thr |
| notification_channel | str | 3.5. multi_notify(int) 3.6. num_workers(int) 3.7. worker_usleep(int) 3.8. ping_interval(int) 3.9. remove_inactive(int) 3.10. fail_count_enabled(int) 3.11. fail_count_threshold_not_active(int) 3.12. fa |
| multi_notify | int | 3.6. num_workers(int) 3.7. worker_usleep(int) 3.8. ping_interval(int) 3.9. remove_inactive(int) 3.10. fail_count_enabled(int) 3.11. fail_count_threshold_not_active(int) 3.12. fail_count_threshold_disa |
| num_workers | int | 3.7. worker_usleep(int) 3.8. ping_interval(int) 3.9. remove_inactive(int) 3.10. fail_count_enabled(int) 3.11. fail_count_threshold_not_active(int) 3.12. fail_count_threshold_disabled(int) |
| worker_usleep | int | 3.8. ping_interval(int) 3.9. remove_inactive(int) 3.10. fail_count_enabled(int) 3.11. fail_count_threshold_not_active(int) 3.12. fail_count_threshold_disabled(int) |
| ping_interval | int | 3.9. remove_inactive(int) 3.10. fail_count_enabled(int) 3.11. fail_count_threshold_not_active(int) 3.12. fail_count_threshold_disabled(int) |
| remove_inactive | int | 3.10. fail_count_enabled(int) 3.11. fail_count_threshold_not_active(int) 3.12. fail_count_threshold_disabled(int) |
| fail_count_enabled | int | 3.11. fail_count_threshold_not_active(int) 3.12. fail_count_threshold_disabled(int) |
| fail_count_threshold_not_active | int | 3.12. fail_count_threshold_disabled(int) |
| fail_count_threshold_disabled | int | 3.1. server_address(str) |
| server_address | str | The local server address. This is the address with which the local DMQ node joins the servers group to send/receive messages. |
| server_socket | str | The local listen address. This is the interface over which the DMQ engine will send/receive messages. |
| notification_address | str | The address of another DMQ node from which the local node should retrieve initial information about all other nodes. This parameter can be specified multiple times in the configuration, to configure m |
| notification_channel | str | The name of the channel for notifications about peers availability. |
| multi_notify | int | Enables the ability to resolve multiple IPv4/IPv6 addresses for a single notification address. Please note that this mode is not supported if you specify multiple notification address parameter. |
| num_workers | int | The number of worker threads for sending/receiving messages. |
| worker_usleep | int | The default locking/synchronisation mechanism between producer/consumer threads is the optimum for most environments. On some systems (e.g. FreeBSD) it can cause high CPU load and in such cases, it ca |
| ping_interval | int | The number of seconds between node pings (for checking status of other nodes). |
| remove_inactive | int | A value of zero disable removing dmq nodes. Node status will be changed to not_active. A non-zero value (default is 1) enable removing nodes. For node that is defined as notification address status wi |
| fail_count_enabled | int | Enable per node counting of failed responses. |
| fail_count_threshold_not_active | int | DMQ node status change from "active" to "not_active" if 408 fail counts are greater than this threshold value: This threshold can be reached both via internal DMQ notification ping mechanism, and othe |
| fail_count_threshold_disabled | int | DMQ node status change from "not_active" to "disabled" if 408 fail counts are greater than this threshold value. This threshold can be reached only via internal DMQ notification ping mechanism: * Fail |
4.2. dmq_process_message([continue]) 4.3. dmq_send_message(channel, node, body, content_type) 4.4. dmq_bcast_message(channel, body, content_type) 4.5. dmq_t_replicate([skip_loop_test]) 4.6. dmq_is_from_node()
4.3. dmq_send_message(channel, node, body, content_type) 4.4. dmq_bcast_message(channel, body, content_type) 4.5. dmq_t_replicate([skip_loop_test]) 4.6. dmq_is_from_node()
4.4. dmq_bcast_message(channel, body, content_type) 4.5. dmq_t_replicate([skip_loop_test]) 4.6. dmq_is_from_node()
4.5. dmq_t_replicate([skip_loop_test]) 4.6. dmq_is_from_node()
4.6. dmq_is_from_node()
4.1. dmq_handle_message([continue])
Handles a DMQ message by passing it to the appropriate local peer (module). The peer is identified by the user part of the To header.
Similar to dmq_handle_message, but the processing is happening immediately, no longer cloning the request in shared memory to be passed to a DMQ worker process.
Sends a DMQ message directly from config file to a single node.
Broadcasts a DMQ message from config file to all active nodes (except self) on the specific channel.
Replicates the current SIP message to all active nodes (except self). Useful for replicating REGISTER, PUBLISH etc. in a clustered environment.
Checks whether the current message has been sent by another active DMQ node in the cluster.
Copyright © 2011 Marius Bucur
Copyright © 2013 Charles Chance, Sipcentric Ltd.
Copyright © 2015 Olle E. Johansson, Edvina AB