Module: kamailio Branch: master Commit: 20706e20a1615c4cd7bd9fad2e8d458fac0ba86f URL: https://github.com/kamailio/kamailio/commit/20706e20a1615c4cd7bd9fad2e8d458f...
Author: Sebastian Damm damm@sipgate.de Committer: Sebastian Damm damm@sipgate.de Date: 2017-05-12T16:13:23+02:00
rabbitmq: create reply-to queue w/ exclusive param
RabbitMQ docs say, temporary reply-to queues should be created with an "exclusive" parameter. This allows only the current connection to access the queue, and when the connection ends, the queue will automatically be deleted.
---
Modified: src/modules/rabbitmq/rabbitmq.c
---
Diff: https://github.com/kamailio/kamailio/commit/20706e20a1615c4cd7bd9fad2e8d458f... Patch: https://github.com/kamailio/kamailio/commit/20706e20a1615c4cd7bd9fad2e8d458f...
---
diff --git a/src/modules/rabbitmq/rabbitmq.c b/src/modules/rabbitmq/rabbitmq.c index 7f9fc12ce0..806dfc9fd4 100644 --- a/src/modules/rabbitmq/rabbitmq.c +++ b/src/modules/rabbitmq/rabbitmq.c @@ -350,7 +350,7 @@ static int rabbitmq_publish_consume(struct sip_msg* msg, char* in_exchange, char
// alloc reply_to queue if (direct_reply_to == 1) { - reply_to = amqp_queue_declare(conn, 1, amqp_cstring_bytes("amq.rabbitmq.reply-to"), 0, 0, 0, 1, amqp_empty_table); + reply_to = amqp_queue_declare(conn, 1, amqp_cstring_bytes("amq.rabbitmq.reply-to"), 0, 0, 1, 1, amqp_empty_table); } else { uuid_generate_random(uuid); uuid_unparse(uuid, uuid_buffer); @@ -358,7 +358,7 @@ static int rabbitmq_publish_consume(struct sip_msg* msg, char* in_exchange, char strcpy(reply_to_buffer, "kamailio-"); strcat(reply_to_buffer, uuid_buffer);
- reply_to = amqp_queue_declare(conn, 1, amqp_cstring_bytes(reply_to_buffer), 0, 0, 0, 1, amqp_empty_table); + reply_to = amqp_queue_declare(conn, 1, amqp_cstring_bytes(reply_to_buffer), 0, 0, 1, 1, amqp_empty_table); }
if (log_on_amqp_error(amqp_get_rpc_reply(conn), "amqp_queue_declare()") != AMQP_RESPONSE_NORMAL) {