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

amqp-schedule

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amqp-schedule

Schedule jobs with `amqp`

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-77.78%
Maintainers
1
Weekly downloads
 
Created
Source

node-amqp-schedule

Install

npm install amqp-schedule

Use with postwait/node-amqp.

Usage

var scheduler = require('ampq-schedule');
var delayedPublish = scheduler(conn); // conn is an amqp.Connection instance

// later

delayedPublish(exchangeName, routingKey, message, delayMs, messageOptions, callback);

// or

delayedPublish(exchangeName, routingKey, message, date, messageOptions, callback);

Details

delayedPublish creates a temporary queue with ttl and dead letter exchange. The queue expires if it's empty.

You can provide a second paramereter (options) to scheduler. options.prefix is the temp queue name prefix, defaults to schedule.. The temp queue expires after delay + options.threshold, threshold defaults to 10 seconds.

So if you want to publish a message 1 min later in the exchange foo with the routing key bar, the message will be hold in a queue named schedule.foo.bar.60000.

Keywords

FAQs

Package last updated on 19 Dec 2013

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