1.0.1 • Published 7 years ago

rmqlite v1.0.1

Weekly downloads
6
License
ISC
Repository
github
Last release
7 years ago

RabbitMQ

RabbitMQ~Message

Message

Kind: inner class of RabbitMQ

message.toString() ⇒ String

Return data as string

Kind: instance method of Message
Returns: String - - message data

message.toJSON() ⇒ Object

Return data as object (Using JSON.parse)

Kind: instance method of Message
Returns: Object - - message data

message.ack() ⇒ deliveryTag

Ack message

Kind: instance method of Message
Returns: deliveryTag - - Delivery tag

RabbitMQ~RabbitMQ

Kind: inner class of RabbitMQ

new RabbitMQ(exchanger, queue, queueOptions, exchangerOptions)

ParamTypeDefaultDescription
exchangerstringexchanger name
queuestringqueue name
queueOptionsobjectqueue options [see this](http://www.squaremobius.net/amqp.node/channel_api.html#channel-assertqueue)
queueOptions.bindbooleantruebind to exchanger by queue name
queueOptions.assertbooleantrueassert queue
exchangerOptionsobjectexchange options [see this](http://www.squaremobius.net/amqp.node/channel_api.html#channel-assertexchange)

rabbitMQ.subscribe(callback, ack, options) ⇒ Promise

Subscribe to queue

Kind: instance method of RabbitMQ

ParamTypeDefaultDescription
callbackMessageHandlermessage handler
ackbooleanfalseAcknowledge the given message
optionsobject[See this](http://www.squaremobius.net/amqp.node/channel_api.html#channel_consume)

rabbitMQ.unsubscribe() ⇒ Promise

Unsubscribe from queue

Kind: instance method of RabbitMQ

rabbitMQ.publish(message, routingKey) ⇒ Promise

Publish message

Kind: instance method of RabbitMQ

ParamTypeDescription
message*message for publish
routingKeystringpublish with routingKey

rabbitMQ.bind(routingKeys) ⇒ *

Bind queue to exchanger with routing key

Kind: instance method of RabbitMQ

ParamTypeDescription
routingKeysstring | ArrayRouting keys

rabbitMQ.unbind(routingKeys) ⇒ *

Unbind queue to exchanger with routing key

Kind: instance method of RabbitMQ

ParamTypeDescription
routingKeysstring | ArrayRouting keys

rabbitMQ.destroy()

Remove this object from EventEmmiter WARNING: This function must be called if you not used this object.

Kind: instance method of RabbitMQ

RabbitMQ.on(event, cb)

Kind: static method of RabbitMQ

ParamTypeDescription
eventstringevent [See this](http://www.squaremobius.net/amqp.node/channel_api.html#model_events) and 'connect' event
cbfunctioncallback function

RabbitMQ.reconnect()

Reconnect to RabbitMQ server and resubscribe and bind all queue

Kind: static method of RabbitMQ

RabbitMQ~MessageHandler : function

Kind: inner typedef of RabbitMQ

ParamTypeDescription
messageMessageincoming message
1.0.1

7 years ago

1.0.0

7 years ago

0.0.14

7 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.3

9 years ago