![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@node-ts/bus-sqs
Advanced tools
An AWS SQS transport adapter for @node-ts/bus-core
.
Install all packages and their dependencies
npm i reflect-metadata inversify @node-ts/bus-sqs @node-ts/bus-core
Once installed, load the BusSqsModule
to your inversify container alongside the other modules it depends on:
import { Container } from 'inversify'
import { LoggerModule } from '@node-ts/logger-core'
import { BusModule } from '@node-ts/bus-core'
import { BUS_SQS_SYMBOLS, BusSqsModule, SqsConfiguration } from '@node-ts/bus-sqs'
const container = new Container()
container.load(new LoggerModule())
container.load(new BusModule())
container.load(new BusSqsModule())
const resourcePrefix = 'integration'
const invalidSqsSnsCharacters = new RegExp('[^a-zA-Z0-9_-]', 'g')
const normalizeMessageName = (messageName: string) => messageName.replace(invalidSqsSnsCharacters, '-')
const AWS_REGION = process.env.AWS_REGION
const AWS_ACCOUNT_ID = process.env.AWS_ACCOUNT_ID
// A sample configuration that sets up rules and conventions for the messaging infrastructure.
const sqsConfiguration: SqsTransportConfiguration = {
queueName: `${resourcePrefix}-test`,
queueUrl: `https://sqs.${AWS_REGION}.amazonaws.com/${AWS_ACCOUNT_ID}/${resourcePrefix}-test`,
queueArn: `arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${resourcePrefix}-test`,
deadLetterQueueName: `${resourcePrefix}-dead-letter`,
deadLetterQueueArn: `arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${resourcePrefix}-dead-letter`,
resolveTopicName: (messageName: string) =>
`${resourcePrefix}-${normalizeMessageName(messageName)}`,
resolveTopicArn: (topicName: string) =>
`arn:aws:sns:${AWS_REGION}:${AWS_ACCOUNT_ID}:${topicName}`,
queuePolicy: `
{
"Version": "2012-10-17",
"Statement": [
{
"Principal": "*",
"Effect": "Allow",
"Action": [
"sqs:SendMessage"
],
"Resource": [
"arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${resourcePrefix}-*"
],
"Condition": {
"ArnLike": {
"aws:SourceArn": "arn:aws:sns:${AWS_REGION}:${AWS_ACCOUNT_ID}:${resourcePrefix}-*"
}
}
}
]
}
`
}
container.bind(BUS_SQS_SYMBOLS.SqsConfiguration).toConstantValue(sqsConfiguration)
Local development can be done with the aid of docker to run the required infrastructure. To do so, run:
docker run -e SERVICES=sqs,sns -e DEFAULT_REGION=us-east-1 -p 4566-4583:4566-4583 localstack/localstack
This will create a localstack instance running and exposing a mock sqs/sns that's compatible with the AWS-SDK. This same environment is used when running integration tests for the SqsTransport
.
FAQs
An AWS SQS transport adapter for @node-ts/bus-core.
The npm package @node-ts/bus-sqs receives a total of 1,684 weekly downloads. As such, @node-ts/bus-sqs popularity was classified as popular.
We found that @node-ts/bus-sqs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.