inspector-amqp
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

inspector-amqp

Typescript Metrics Reporter for AMQP.

NPM Version License Build Status Dependencies Status

This library is made for inspector-metrics node module and is meant to be used with typescript / nodejs.

It uses amqp-ts as amqp client.

install

npm install --save inspector-amqp

basic usage

import { Event } from "inspector-metrics";
import { AmqpMetricReporter, AmqpTopologyHelper } from "../metrics";
 
// Instantiate the AMQP reporter
const reporter: AmqpMetricReporter = new AmqpMetricReporter({
  amqpTopologyBuilder: AmqpTopologyHelper.queue("amqp://localhost", "queue"),
});
 
// Create the event
const event = new Event<{}>("test").setValue({
  int: 123,
  string: "toto",
});
 
// Report the event
reporter.reportEvent(event);

running rabbitmq locally (using docker)

docker run -d --hostname my-rabbit --name my-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq
docker exec my-rabbit rabbitmq-plugins enable rabbitmq_management

releasing / publish docs / publish package

# check functionality
npm i
npm run build
 
# release
git commit -am "release of a.b.c"
git push
git tag va.b.c
git push --tags
 
# publish docs
rm -fr docs/
git branch -D gh-pages
git worktree prune
git worktree list
git worktree add -b gh-pages docs origin/gh-pages
npm run publishDocs
 
# publish package
npm publish

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i inspector-amqp

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

46.6 kB

Total Files

45

Last publish

Collaborators

  • doubret