
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
simple message queue based on Redis streams
Only Redis 5.x and above support stream
npm install redmq
# yarn add redmq
# pnpm add redmq
import { RedMQ } from 'redmq'
const redmq = new RedMQ('id')
// producer
const producer = redmq.producer()
producer.send('my-topic', { body: 'body content' })
// consumer
const consumer = redmq.consumer(
'group',
['topic1', 'topic2'],
async (msg) => {
// handle the message
}
)
consumer.start()
The term topic used here is actually the key of stream in Redis, multiple topics means multiple streams.
Producer is simple and straightforward, the maxLen options is used for a capped stream, that means the messages will not exceed the maxLen(it's not accurate, since using almost exact trimming (the ~ argument)).
Consumers use pull strategy for fetching new messages, for the messages that are not processed successfully will be retried after a specific time.
Options:
timeout: message will be redelivered if timeout is reached
batchSize: how many messages will be fetched in one time for a consumer
maxDeliverTimes: the message will be abandon if the max deliver times reached
Each producer and consumer will share the same Redis connection by default, if you want the producer or consumer to use an individual connection, just set shareConnection to false, then a new connection will created for it.
FAQs
simple message queue based on Redis streams
The npm package redmq receives a total of 3 weekly downloads. As such, redmq popularity was classified as not popular.
We found that redmq 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
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.