Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
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 6 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.