New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hitch/mq

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hitch/mq

Abstraction layer to work with AMQP message queue systems.

  • 0.7.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-66.67%
Maintainers
2
Weekly downloads
 
Created
Source

Hitch MQ module

Abstraction layer to work with exchanges in message queue systems.

Example

const { TopicMQ } = require('@hitch/mq');

// Check http://www.squaremobius.net/amqp.node/channel_api.html to see all options.
const mq = new TopicMQ({
  exchange: 'exchange name',
  subscribe: true, // Whether to subscribe or not. Defaults to true.
  queue_options: { exclusive: true },
  consumer_options: { noAck: true },
  topic: 'v1.user.signup',
  consumer: consumeMessage,
  username: 'username',
  password: 'password',
  host: 'myhost',
  port: '5672'
});

mq.on('error', err => console.error(err));
mq.on('connect', () => {
  console.log('connected');
});

mq.connect();

function consumeMessage (msg) {
  console.log(msg.content.toString());
}

FAQs

Package last updated on 19 May 2017

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