New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rmq-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rmq-wrapper

RMQ wrapper

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

Functions

connect([host])
Exchange(name, [type], [options])

connect([host])

Kind: global function

ParamTypeDescription
[host]stringdefault is process.env.RMQ_HOST

Exchange(name, [type], [options])

Kind: global function

ParamTypeDescription
namestringName of the exchange
[type]string'direct', 'fanout' etc, default is 'direct'
[options]objectamqp channel.assertExchange options object

exchange.subscribe(queue, consumeHandler, [routingKey], [prefetch], [messageTtl])

Kind: instance method of Exchange

ParamTypeDescription
queuestringname of queue
consumeHandlerfunctionhandler function to call when message arrives on queue
[routingKey]stringoptional routing key, defaults to queue name
[prefetch]numberoptional number of messages to prefetch, default is 1
[messageTtl]numberoptional time to live for messages on the queue, default is process.env.RMQ_MESSAGE_TTL

exchange.ack(message)

Kind: instance method of Exchange

ParamTypeDescription
messageobjectmessage to ack

exchange.publish(routingKey, message, [options])

Kind: instance method of Exchange

ParamTypeDescription
routingKeystringoptional routing key, defaults to queue name
messageobjectmessage to send (JSON object)
[options]objectamqplib options object for publish method

exchange.sendRPCMessage(queue, message, [timeout])

Kind: instance method of Exchange

ParamTypeDescription
queuestringname of queue
messageobjectmessage to send (JSON object)
[timeout]numbertime to wait for response in ms, default is process.env.RMQ_RPC_TIMEOUT

exchange.replyToRPC(message, reply)

Kind: instance method of Exchange

ParamTypeDescription
messageobjectthe original message to reply to
replyobjectJSON content of the reply messsage

Keywords

RabbitMq

FAQs

Package last updated on 26 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts