Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amqptools

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amqptools

AMQP Tools

  • 0.29.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Amqptools

Install

npm install amqptools

Usage

Initialize

import amqpTools = require('amqptools');
amqpTools.setConnectionURI(RABBITMQ_URL);

Task start

var taskManager = amqpTools.tasks;
var newTask = taskManager.createTask('testTask', {title: "test", data: {value: 1}});
newTask.start(() => {
  should.exists(newTask.uuid);
}

Task process

var taskManager = amqpTools.tasks;
taskManager.service = SERVICE_NAME;
taskManager.processTask(TASK_TYPE, function (taskdata, taskDone) {
    // Your task processor
    // invoke taskDone() when task is done
})

Events

high level event emitter over amqp

each event should has format:
<exchange>:<topic>

RPC

high level RPC over AMQP
action in format:
<exchange>:<topic>

request:
caller -> erpc:<exchange> (topic) -> processor
response:
processor -> replyTo -> caller

Keywords

FAQs

Package last updated on 20 May 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc