amqptools
AMQP Tools
Last updated a month ago by calibr .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install amqptools 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.19.0                                ...           latest (a month ago)

35 Versions

  • 0.19.0                                ...           a month ago
  • 0.18.0                                ...           a month ago
  • 0.17.3                                ...           5 months ago
  • 0.17.2                                ...           5 months ago
  • 0.17.1                                ...           5 months ago
  • 0.17.0                                ...           5 months ago
  • 0.16.0                                ...           5 months ago
  • 0.15.1                                ...           a year ago
  • 0.15.0                                ...           a year ago
  • 0.14.1                                ...           a year ago
  • 0.14.0                                ...           a year ago
  • 0.13.0                                ...           2 years ago
  • 0.12.1                                ...           2 years ago
  • 0.11.2                                ...           3 years ago
  • 0.11.1                                ...           3 years ago
  • 0.11.0                                ...           3 years ago
  • 0.10.5                                ...           3 years ago
  • 0.10.4                                ...           3 years ago
  • 0.10.3                                ...           3 years ago
  • 0.10.2                                ...           3 years ago
  • 0.10.1                                ...           3 years ago
  • 0.10.0                                ...           3 years ago
  • 0.9.0                                ...           3 years ago
  • 0.8.1                                ...           4 years ago
  • 0.7.1                                ...           4 years ago
  • 0.7.0                                ...           4 years ago
  • 0.6.4                                ...           5 years ago
  • 0.6.3                                ...           5 years ago
  • 0.6.2                                ...           5 years ago
  • 0.6.1                                ...           5 years ago
  • 0.5.1                                ...           5 years ago
  • 0.5.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (8)
Dependents (3)

Copyright 2014 - 2016 © taobao.org |