FS-8329 #resolve Also fixes default configs to keep in line with a change made for Fs-7806 FS-7803
This commit is contained in:
parent
42ef181e7c
commit
444b9152b2
|
@ -20,8 +20,8 @@
|
|||
</connection>
|
||||
</connections>
|
||||
<params>
|
||||
<param name="exchange" value="TAP.Events"/>
|
||||
<param name="exchange_type" value="topic"/>
|
||||
<param name="exchange-name" value="TAP.Events"/>
|
||||
<param name="exchange-type" value="topic"/>
|
||||
<param name="circuit_breaker_ms" value="10000"/>
|
||||
<param name="reconnect_interval_ms" value="1000"/>
|
||||
<param name="send_queue_size" value="5000"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</connection>
|
||||
</connections>
|
||||
<params>
|
||||
<param name="exchange" value="TAP.Commands"/>
|
||||
<param name="exchange-name" value="TAP.Commands"/>
|
||||
<param name="binding_key" value="commandBindingKey"/>
|
||||
<param name="reconnect_interval_ms" value="1000"/>
|
||||
</params>
|
||||
|
|
|
@ -119,7 +119,7 @@ switch_status_t mod_amqp_command_create(char *name, switch_xml_t cfg)
|
|||
if ( interval && interval > 0 ) {
|
||||
profile->reconnect_interval_ms = interval;
|
||||
}
|
||||
} else if (!strncmp(var, "exchange", 8)) {
|
||||
} else if (!strncmp(var, "exchange-name", 13)) {
|
||||
exchange = switch_core_strdup(profile->pool, val);
|
||||
} else if (!strncmp(var, "binding_key", 11)) {
|
||||
binding_key = switch_core_strdup(profile->pool, val);
|
||||
|
|
|
@ -176,7 +176,6 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
|
|||
switch_threadattr_t *thd_attr = NULL;
|
||||
char *exchange = NULL, *exchange_type = NULL, *content_type = NULL;
|
||||
int exchange_durable = 1; /* durable */
|
||||
int exchange_auto_delete = 0;
|
||||
int delivery_mode = -1;
|
||||
int delivery_timestamp = 1;
|
||||
switch_memory_pool_t *pool;
|
||||
|
@ -246,8 +245,6 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
|
|||
exchange = switch_core_strdup(profile->pool, val);
|
||||
} else if (!strncmp(var, "exchange-durable", 16)) {
|
||||
exchange_durable = switch_true(val);
|
||||
} else if (!strncmp(var, "exchange-auto-delete", 20)) {
|
||||
exchange_auto_delete = switch_true(val);
|
||||
} else if (!strncmp(var, "delivery-mode", 13)) {
|
||||
delivery_mode = atoi(val);
|
||||
} else if (!strncmp(var, "delivery-timestamp", 18)) {
|
||||
|
@ -289,7 +286,6 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
|
|||
profile->exchange = exchange ? exchange : switch_core_strdup(profile->pool, "TAP.Events");
|
||||
profile->exchange_type = exchange_type ? exchange_type : switch_core_strdup(profile->pool, "topic");
|
||||
profile->exchange_durable = exchange_durable;
|
||||
profile->exchange_auto_delete = exchange_auto_delete;
|
||||
profile->delivery_mode = delivery_mode;
|
||||
profile->delivery_timestamp = delivery_timestamp;
|
||||
profile->content_type = content_type ? content_type : switch_core_strdup(profile->pool, MOD_AMQP_DEFAULT_CONTENT_TYPE);
|
||||
|
@ -340,8 +336,8 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
|
|||
amqp_exchange_declare(profile->conn_active->state, 1,
|
||||
amqp_cstring_bytes(profile->exchange),
|
||||
amqp_cstring_bytes(profile->exchange_type),
|
||||
0, /* passive */
|
||||
profile->exchange_durable,
|
||||
profile->exchange_auto_delete,
|
||||
amqp_empty_table);
|
||||
|
||||
if (mod_amqp_log_if_amqp_error(amqp_get_rpc_reply(profile->conn_active->state), "Declaring exchange")) {
|
||||
|
|
Loading…
Reference in New Issue