Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
consistent-hash-exchange
Advanced tools
Readme
An internal message exchange that distributes asynchronous requests into serializable, but concurrently running queues using consistent hashing as the routing mechanism.
Since the exchange uses consistent hashing, every job enqueued with the same routingKey ends up in the same queue. That way, partial ordering of requests based on their routing key can be achieved while maintaing a desired level of concurrency.
const Exchange = require('consistent-hash-exchange')
// define a task
const task = async args => {
// do something async and return results
const result = await db.write(args)
return result
}
// create a new exchange that binds 20 concurrent queues each
// running the task defined above in series
const exchange = new Exchange(task, 20)
// enqueue a job
const replyToken = Math.floor(Math.random() * 10)
const routingKey = 'some routing key'
const args = { name: 'some name' }
exchange.enqueue(replyToken, routingKey, args)
// listen to the reply event that will be fired when
// the job has been processed
exchange.once(replyToken, result => {
console.log(result)
})
FAQs
An internal message exchange that distributes asynchronous requests into serializable, but concurrently running queues using consistent hashing as the routing mechanism
The npm package consistent-hash-exchange receives a total of 1 weekly downloads. As such, consistent-hash-exchange popularity was classified as not popular.
We found that consistent-hash-exchange 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.