![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@gojob/nest-cloud-pub-sub-transport
Advanced tools
Changelog
[1.0.0] - 2020-01-19
Readme
A Custom Transport strategy for Cloud Pub/Sub in Nest microservices.
yarn add @gojob/nest-cloud-pub-sub-transport
# or
npm install @gojob/nest-cloud-pub-sub-transport
Here is an example of implementation in your Nest application:
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const configService = app.get(ConfigService);
app.connectMicroservice({
strategy: new CloudServerPubSub({
// configuration passed "as is" to the Cloud PubSub client
clientConfig: {
keyFile: configService.get('GCP_KEY_FILE_PUBSUB'),
},
// custom options, specific to this package
options: {
logger: app.get(LOGGER),
// useful when your app is using a single topic & subscription
defaultTopic: configService.get('DEFAULT_PUB_SUB_TOPIC'),
defaultSubscription: configService.get('DEFAULT_PUB_SUB_SUBSCRIPTION'),
},
}),
});
await app.startAllMicroservices();
await app.listen(3000);
}
Then use @EventPattern
from @nestjs/microservices
to call your event handlers when a new message is received in Pub/Sub.
Command | Action |
---|---|
yarn compile | Ensure the TypeScript code can be compiled using tsc |
yarn build | Build the project (transpile the code to JavaScript) |
yarn lint | Lint the code (ESLint à |
yarn test | Run unit tests |
yarn integration | Run integration tests |
FAQs
A Custom Transport strategy of the NestJS microservices pattern for Cloud Pub/Sub.
The npm package @gojob/nest-cloud-pub-sub-transport receives a total of 17 weekly downloads. As such, @gojob/nest-cloud-pub-sub-transport popularity was classified as not popular.
We found that @gojob/nest-cloud-pub-sub-transport demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.