- RabbitMQ
- ~Message
- .toString() ⇒
String
- .toJSON() ⇒
Object
- .ack() ⇒
deliveryTag
- .toString() ⇒
- ~RabbitMQ
- new RabbitMQ(exchanger, queue, [queueOptions], [exchangerOptions])
- instance
- .subscribe(callback, [ack], [options]) ⇒
Promise
- .unsubscribe() ⇒
Promise
- .publish(message, [routingKey]) ⇒
Promise
- .bind(routingKeys) ⇒
*
- .unbind(routingKeys) ⇒
*
- .destroy()
- .subscribe(callback, [ack], [options]) ⇒
- static
- ~MessageHandler :
function
- ~Message
Message
Kind: inner class of RabbitMQ
- ~Message
- .toString() ⇒
String
- .toJSON() ⇒
Object
- .ack() ⇒
deliveryTag
- .toString() ⇒
Return data as string
Kind: instance method of Message
Returns: String
- - message data
Return data as object (Using JSON.parse)
Kind: instance method of Message
Returns: Object
- - message data
Ack message
Kind: instance method of Message
Returns: deliveryTag
- - Delivery tag
Kind: inner class of RabbitMQ
- ~RabbitMQ
- new RabbitMQ(exchanger, queue, [queueOptions], [exchangerOptions])
- instance
- .subscribe(callback, [ack], [options]) ⇒
Promise
- .unsubscribe() ⇒
Promise
- .publish(message, [routingKey]) ⇒
Promise
- .bind(routingKeys) ⇒
*
- .unbind(routingKeys) ⇒
*
- .destroy()
- .subscribe(callback, [ack], [options]) ⇒
- static
Param | Type | Default | Description |
---|---|---|---|
exchanger | string |
exchanger name | |
queue | string |
queue name | |
[queueOptions] | object |
queue options [ | |
[queueOptions.bind] | boolean |
true |
bind to exchanger by queue name |
[queueOptions.assert] | boolean |
true |
assert queue |
[exchangerOptions] | object |
exchange options [ |
Subscribe to queue
Kind: instance method of RabbitMQ
Param | Type | Default | Description |
---|---|---|---|
callback | MessageHandler |
message handler | |
[ack] | boolean |
false |
Acknowledge the given message |
[options] | object |
[ |
Unsubscribe from queue
Kind: instance method of RabbitMQ
Publish message
Kind: instance method of RabbitMQ
Param | Type | Description |
---|---|---|
message | * |
message for publish |
[routingKey] | string |
publish with routingKey |
Bind queue to exchanger with routing key
Kind: instance method of RabbitMQ
Param | Type | Description |
---|---|---|
routingKeys | string | Array |
Routing keys |
Unbind queue to exchanger with routing key
Kind: instance method of RabbitMQ
Param | Type | Description |
---|---|---|
routingKeys | string | Array |
Routing keys |
Remove this object from EventEmmiter WARNING: This function must be called if you not used this object.
Kind: instance method of RabbitMQ
Kind: static method of RabbitMQ
Param | Type | Description |
---|---|---|
event | string |
event [ |
cb | function |
callback function |
Reconnect to RabbitMQ server and resubscribe and bind all queue
Kind: static method of RabbitMQ
Kind: inner typedef of RabbitMQ
Param | Type | Description |
---|---|---|
message | Message |
incoming message |