
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A BigQueue module for node.js-based apps
Install global & local dependencies.
$ [sudo] npm install -g coffee coffeegulp [docco]
$ npm install
Module is self configured to point to a local instance of BigQueue. It uses the
node-config module, so you should
place your config files on ./config
folder in order to change the defaults.
These are the default configuration values. More information on how override it is available here.
---
bigqueue:
# Base URL. You may place #{cluster} in this value to point
# to specific BigQueue instances.
baseUri: 'http://127.0.0.1:8081'
producer:
# Path to produce messages.
postUri: '/messages'
# Number of retries before failing.
defaultRetries: 3
# Timeout between fails.
defaultTimeout: 1000
consumer:
# Reading path.
readUri: '/topics/#{topic}/consumers/#{consumer}/messages'
# Acknowledgement path.
ackUri: '/topics/#{topic}/consumers/#{consumer}/messages/#{recipient}'
worker:
# Time before start-up fetching messages.
startDelay: 2000
# Waiting time when the queue gets empty.
sleepOnEmpty: 1000
# Waiting time when fetching fails.
sleepOnError: 2000
client:
# Time module users has to process a message before timing out
# without acknowledgment.
processTimeout: 500
logger:
# Enable log messages.
enabled: true
$ npm test
$ coffeegulp [task = default]
lint -- run lint checks
test -- run tests
coffee -- compile scripts into .js
default -- perform all tasks above
docco -- generate docs
{Consumer, Producer} = require 'bigqueue'
# Create Producer, with max_retries, timeout.
producer = new Producer 3, 2000
# Send 'hello world!' message.
producer.send 'cluster', ['test_topic', 'another'], 'hello world!'
.then(
(value) ->
console.log "message sent: #{JSON.stringify(value)}"
(error) ->
console.log "message failed: #{error}"
)
consumer = new Consumer 'cluster', 'test_consumer',
['test_topic', 'another']
consumer.on 'start', (consumer) ->
console.log "we're up and running!"
consumer.on 'stop', (consumer) ->
console.log 'stop!'
# Don't forget to notify Consumer whether we've been able to process the
# message or not!
consumer.on 'message', (message, ack) ->
console.log "got a message!: #{JSON.stringify(message)}"
# Process the message. We shouldn't take much time in here, otherwise we may
# timeout.
db.save message, (error) ->
ack(error)
consumer.on 'ack', (message) ->
console.log "message acknowledged!: #{message.recipientCallback}"
consumer.on 'uptodate', (consumer) ->
console.log "we're up to date!"
# Start consuming events.
consumer.start()
FAQs
A BigQueue module for node.js-based apps
The npm package bigqueue receives a total of 1 weekly downloads. As such, bigqueue popularity was classified as not popular.
We found that bigqueue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.