Skip to content

Kealman/rmqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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])

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 [

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

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 [

rabbitMQ.unsubscribe() ⇒ Promise

Unsubscribe from queue

Kind: instance method of RabbitMQ

rabbitMQ.publish(message, [routingKey]) ⇒ Promise

Publish message

Kind: instance method of RabbitMQ

Param Type Description
message * message for publish
[routingKey] string publish with routingKey

rabbitMQ.bind(routingKeys) ⇒ *

Bind queue to exchanger with routing key

Kind: instance method of RabbitMQ

Param Type Description
routingKeys string | Array Routing keys

rabbitMQ.unbind(routingKeys) ⇒ *

Unbind queue to exchanger with routing key

Kind: instance method of RabbitMQ

Param Type Description
routingKeys string | Array Routing 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

Param Type Description
event string event [
cb function callback 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

Param Type Description
message Message incoming message

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published