Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@vtfk/azure-servicebus-queue
Advanced tools
Readme
High-level API for Azure Servicebus Queue operations.
Uses the @azure/service-bus SDK
npm i --save @vtfk/azure-servicebus-queue
Get connection string for Service Bus & names for Queues/Topics/Subscriptions
const serviceBusClient = require('@vtfk/azure-servicebus-queue')({
connectionString: '<Servicebus Connection String>'
/* Uncomment to send and receive messages >64kb
storageConnectionString: '<Blob Service SAS URL>'
storageContainerName: '<Container name>'
*/
})
TODO
TODO
First, connect to the desired topic
const topic = serviceBusClient.topic('topicName')
Looks at mesages but don't delete
const limit = 6
const messages = await topic.peek(limit)
Returns an array of max 6 messages.
const messages = await topic.peekBySequenceNumber('<sequenceNumber>')
const message = { body: 'message' }
await topic.send(message)
const limit = 10
const timeoutInSeconds = 1
const messages = await topic.receive(limit, timeoutInSeconds)
const messages = [{ body: '1' }, { body: '2' }]
await topic.sendBatch(messages)
const dateToSend = new Date().toISOString()
const message = { body: 'message' }
await topic.scheduleMessage(dateToSend, message)
const dateToSend = new Date().toISOString()
const messages = [{ body: '1' }, { body: '2' }]
await topic.scheduleMessages(dateToSend, messages)
First, connect to the desired queue
const queue = serviceBusClient.queue(queueName)
Looks at mesages but don't delete
const limit = 6
const messages = await queue.peek(limit)
Returns an array of max 6 messages.
const messages = await queue.peekBySequenceNumber('<sequenceNumber>')
const message = { body: 'message' }
await queue.send(message)
const limit = 10
const timeoutInSeconds = 1
const messages = await queue.receive(limit, timeoutInSeconds)
const messages = [{ body: '1' }, { body: '2' }]
await queue.sendBatch(messages)
const dateToSend = new Date().toISOString()
const message = { body: 'message' }
await queue.scheduleMessage(dateToSend, message)
const dateToSend = new Date().toISOString()
const messages = [{ body: '1' }, { body: '2' }]
await queue.scheduleMessages(dateToSend, messages)
To run example.js
create file .env
in project root with following content
QUEUE_NAME=<queue name>
QUEUE_CONNECTION_STRING=<queue connection string url>
And run npm run example
FAQs
High-level API for Azure Servicebus Queue operations
We found that @vtfk/azure-servicebus-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).