
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
sbnoti
because Azure has problems with large path names -__-)Notifications Reader for Azure Service Bus
SbnotiBuilder = require("sbnoti")
reader = new SbnotiBuilder()
.withServiceBus #required
connectionString: "the azure connection string"
topic: "the topic name"
subscription: "the subscription name"
#All settigns below are optional. The values are the defaults.
.withFilters [
{ name: "theNameOfTheCustomFilter", expression: "created = True" }
]
.withLogging true # or simply .withLogging()
.withConcurrency 25
.withReceiveBatchSize 5
.withWaitForMessageTime 3000
# new health notifiying option:
.withHealth
redis:
host: "host"
port: 6739
auth: "cadenaDeAuth"
db: 2
app: "la-aplicacion-que-esta-usando-sbnoti"
.build()
reader = new SbnotiBuilder()
.withServiceBus #required
connectionString: "the azure connection string"
topic: "the topic name"
subscription: "the subscription name"
.fromDeadLetter()
.build()
reader = new SbnotiBuilder()
.withServiceBus #required
connectionString: "the azure connection string"
topic: "the topic name"
subscription: "the subscription name"
.activeFor
pending: true #Read from regular subscription
failed: true #Read from dead letter
.build()
stringToBoolean: (value,_default) ->
(value?.toLowerCase?() ? _default?.toString()) == 'true'
Promise = require("bluebird")
reader.run (message) =>
# do something with message
Promise.resolve "message processed ok"
# or...
Promise.reject "error processing the message"
messageToOptions = (message) =>
uri: "http://an.endpoint.com"
body: message.data
headers:
authorization: "access token"
reader.runAndPost messageToOptions, ignoredStatusCodes: [409,503]
reader.runAndGet messageToOptions
reader.runAndPut messageToOptions
reader.runAndDelete messageToOptions
#or also
method = 'post', #'get','delete','update'
reader.runAndRequest messageToOptions, method, ignoredStatusCodes: [409]
FAQs
Notifications Reader for Azure Service Bus
The npm package sbnoti receives a total of 18 weekly downloads. As such, sbnoti popularity was classified as not popular.
We found that sbnoti demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.