
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Simple message, queue and pubsub system compatible with RabbitMQ.
Communicates events and jobs across processes and servers.
npm install messagehub
You also need to connect to a running RabbitMQ server at the host specified.
messagehub = require 'messagehub'
myhub = messagehub 'localhost', 'mychannel'
You can also send an AMQP url as the first parameter, or the options hash as describe here.
Emit an event
messagehub = require 'messagehub'
myhub = messagehub 'localhost', 'mychannel'
myhub.emit 'messages.one', {key: "value"}
Observe an event (ALL handlers will trigger)
messagehub = require 'messagehub'
myhub = messagehub 'localhost', 'mychannel'
myhub.on 'messages.one', (data) ->
console.log "MESSAGES.ONE", data
Queue a job
messagehub = require 'messagehub'
myhub = messagehub 'localhost', 'mychannel'
myhub.job 'jobs.one', {key: "value"}
Handle a job (jobs are balanced between workers)
messagehub = require 'messagehub'
myhub = messagehub 'localhost', 'mychannel'
myhub.worker 'jobs.one', (data, done) ->
console.log "JOBS.ONE", data
done()
You can put more than one worker in the same file. It will only send you one job per worker registered.
messagehub = require 'messagehub'
myhub = messagehub 'localhost', 'mychannel'
# handler function
handleJobOne = (data, done) ->
console.log "JOBS.ONE", data
done()
# register 4 workers
myhub.worker 'jobs.one', handleJobOne
myhub.worker 'jobs.one', handleJobOne
myhub.worker 'jobs.one', handleJobOne
myhub.worker 'jobs.one', handleJobOne
FAQs
Simple message, queue and pubsub system compatible with RabbitMQ
The npm package messagehub receives a total of 0 weekly downloads. As such, messagehub popularity was classified as not popular.
We found that messagehub 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.