
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
amqp-simple-pub-sub
Advanced tools
A simple Pub Sub system that uses AMQP Messaging to exchange data between services
A simple Pub Sub system that uses AMQP Messaging to exchange data between services
You project needs to be using at least Node version 8, and ideally Node 10 or better.
npm install amqp-simple-pub-sub
const { makePublisher } = require('amqp-simple-pub-sub')
const publisher = makePublisher({ exchange: 'testService' })
await publisher.start()
publisher.publish('test', 'Hello World')
const { makeSubscriber } = require('amqp-simple-pub-sub')
const subscriber = makeSubscriber({
exchange: 'testService',
queueName: 'testQueue',
routingKeys: ['test']
})
const handler = message => {
console.log('Message Received', message)
subscriber.ack(message)
}
subscriber.start(handler)
The full options object is as follows
{
type: 'topic' // the default
url: 'amqp://localhost' // the default
exchange: 'you must provide this' // it's the name of your service usually
onError: err => { // optional
console.error('A connection error happened', err) // or do something clever
}
onClose: () => { // optional
console.log('The connection has closed.') // or do something clever
}
}
The full options object is as follows
{
type: 'topic' // the default
url: 'amqp://localhost' // the default
exchange: 'you must provide this' // it's the name of your service usually
queueName: 'you must also provide this' // give your queue a name
routingKeys: ['an', 'array', 'of', 'routingKeys'] // optional. Uses [queueName] otherwise.
onError: err => { // optional
console.error('A connection error happened', err) // or do something clever
}
onClose: () => { // optional
console.log('The connection has closed.') // or do something clever
}
}
See some examples in the tests, and also:
nvm
to manage Node versions — brew install nvm
.)npm install
docker-compose up -d
Runs Rabbit MQ.
npm test
— runs the unit tests (quick and does not need rabbit mq running)npm run test:integration
— runs the integration tests (not so quick and needs rabbitmq running)npm run lint
Please see the contributing notes.
FAQs
A Pub Sub system that uses AMQP Messaging to exchange data between services
The npm package amqp-simple-pub-sub receives a total of 65 weekly downloads. As such, amqp-simple-pub-sub popularity was classified as not popular.
We found that amqp-simple-pub-sub 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.