Merge pull request #659 from mfournier/amqp-fixups
authorPierre-Yves Ritschard <pyr@spootnik.org>
Sat, 26 Jul 2014 07:19:14 +0000 (09:19 +0200)
committerPierre-Yves Ritschard <pyr@spootnik.org>
Sat, 26 Jul 2014 07:19:14 +0000 (09:19 +0200)
Amqp fixups

src/amqp.c
src/collectd.conf.pod

index bdc62b3..41390e9 100644 (file)
@@ -928,9 +928,9 @@ static int camqp_config_connection (oconfig_item_t *ci, /* {{{ */
             status = cf_util_get_string (child, &conf->exchange_type);
         else if ((strcasecmp ("Queue", child->key) == 0) && !publish)
             status = cf_util_get_string (child, &conf->queue);
-        else if (strcasecmp ("QueueDurable", child->key) == 0)
+        else if ((strcasecmp ("QueueDurable", child->key) == 0) && !publish)
             status = cf_util_get_boolean (child, &conf->queue_durable);
-        else if (strcasecmp ("QueueAutoDelete", child->key) == 0)
+        else if ((strcasecmp ("QueueAutoDelete", child->key) == 0) && !publish)
             status = cf_util_get_boolean (child, &conf->queue_auto_delete);
         else if (strcasecmp ("RoutingKey", child->key) == 0)
             status = cf_util_get_string (child, &conf->routing_key);
index 70ae78b..8d05e9a 100644 (file)
@@ -506,6 +506,8 @@ possibly filtering or messages.
      Exchange "amq.fanout"
  #   ExchangeType "fanout"
  #   Queue "queue_name"
+ #   QueueDurable false
+ #   QueueAutoDelete true
  #   RoutingKey "collectd.#"
    </Subscribe>
  </Plugin>
@@ -558,9 +560,23 @@ be bound to this exchange.
 
 =item B<Queue> I<Queue> (Subscribe only)
 
-Configures the I<queue> name to subscribe to. If no queue name was configures
+Configures the I<queue> name to subscribe to. If no queue name was configured
 explicitly, a unique queue name will be created by the broker.
 
+=item B<QueueDurable> B<true>|B<false> (Subscribe only)
+
+Defines if the I<queue> subscribed to is durable (saved to persistent storage)
+or transient (will disappear if the AMQP broker is restarted). Defaults to
+"false".
+
+This option should be used in conjunction with the I<Persistent> option on the
+publish side.
+
+=item B<QueueAutoDelete> B<true>|B<false> (Subscribe only)
+
+Defines if the I<queue> subscribed to will be deleted once the last consumer
+unsubscribes. Defaults to "true".
+
 =item B<RoutingKey> I<Key>
 
 In I<Publish> blocks, this configures the routing key to set on all outgoing