AmqpQueue.coffee | |
---|---|
AMQP Queue class for AMQP DSL | module.exports = class AmqpQueue |
| constructor:( @name, options, openCallback) ->
if !@name
throw new Error("Queue must have a name")
@options = {}
@openCallback = ->
if typeof options == "function"
@openCallback = options
else if typeof options == "object"
@options = options
if typeof openCallback == "function"
@openCallback = openCallback
|
Real reference to an AMQP::Queue object | @ref = null
|
| bind:( @exchangeName, @routingKey ) -> |
| subscribe:( @sOptions, @messageListener ) ->
if typeof @sOptions == 'function'
@messageListener = @sOptions
@sOptions = {}
|