@@ -28,19 +28,20 @@ Usage
2828 interested in severe weather alerts (which can be found at
2929 [ http://dd.weather.gc.ca/alerts/cap/ ] [ 2 ] ), then the subtopic
3030 ` "alerts.cap.#" ` is appropriate.
31- * ` amqp_queue ` (defaults to ` "q_anonymous_node-eccc_$RANDOM" ` ): the name
32- of the queue to subscribe to. In general, this should simply be a
33- unique string starting with ` q_anonymous ` ; the default (which selects a
34- random name) should be adequate for the common case. However, you
35- should override the default to something nonrandom if you enable
36- ` amqp_durable ` , below.
31+ * ` amqp_queue ` (defaults to ` "node-eccc_$RANDOM" ` ): the name of the queue
32+ to subscribe to. In general, this should simply be a unique string; the
33+ default (which selects a random name) should be adequate for the common
34+ case. However, you should override the default to something nonrandom
35+ if you enable ` amqp_durable ` , below.
36+ * ` amqp_expires ` (defaults to ` 3*3600*1000 ` ): how long (in milliseconds)
37+ the queue will survive after all clients have disconnected. (This is
38+ only meaningful if ` amqp_durable ` , below, is set.)
3739 * ` amqp_durable ` (defaults to ` false ` ): notifies the AMQP server as to
3840 whether the queue should be durable (e.g. persist in case all clients
3941 disconnect). This is advisable in production settings where it is
4042 imperative that messages should not get lost; however, it should be
41- used with care, since a prolonged outage may cause a queue to become
42- extremely full and induce server problems at ECCC. (And, possibly, get
43- our client banned. So be nice!)
43+ used with care (alongside ` amqp_expires ` , see above), since it is
44+ impolite to leave discarded queues lying around the ECCC server.
4445
4546 This function returns an EventEmitter that emits the following events:
4647
5253
5354 The AMQP connection is robust, automatically reconnecting to the server on
5455 failure (though if the queue is not durable, messages sent in the meantime
55- will be lost).
56+ may be lost).
5657
5758[ 1 ] : http://dd.weather.gc.ca/
5859[ 2 ] : http://dd.weather.gc.ca/alerts/cap/
0 commit comments