Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@narando/event-consumer
Advanced tools
Helps consuming business events from the Event System (SQS).
This package is oriented towards services that consume events as a secondary priority.
This README describes the package in-detail. See here for a more complete overview of the Event System.
If the main purpose of the service is consuming events, or the service wants to use SQS internally. Using the
sqs-consumer
by BBC is recommended.
You need to have nodejs
and npm
installed.
$ npm install @narando/event-consumer
First you need to import the package.
import EventConsumer from "@narando/event-consumer";
You need to set your AWS credentials and SQS settings for this package to work.
Below you can find an example config.js.
{
"aws": {
"auth": {
"accessKeyId": "",
"secretAccessKey": ""
},
"sqsEvents": {
"region": "eu-central-1",
"queueUrl": "https://sqs.eu-west-1.amazonaws.com/123513728131/dev-events"
}
}
}
The
queueUrl
is specific for each service. Check that you haveevent-stream/subscription
configured in narando/devops.
Events can be listened on by subscribing to the exported EventEmitter
. We use emittery
as a replacement for EventEmitter
to support asynchronous event handler. Using the canonical EventEmitter
we can not reliably verify that the handler did not throw an error.
The list of available events can be found here.
EventConsumer.on("api:user:created", async event => {
await sendWelcomeMessage(event.user);
});
Required Parameters:
{String}
Name of the event{Function}
async Handler that will be called to consume eventsAs this package is part of the toolkit monorepo, please refer to the top-level README to learn about hacking on this package.
FAQs
Consume Events from Event System
The npm package @narando/event-consumer receives a total of 18 weekly downloads. As such, @narando/event-consumer popularity was classified as not popular.
We found that @narando/event-consumer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.