Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/storage-queue

Package Overview
Dependencies
Maintainers
5
Versions
353
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/storage-queue

Microsoft Azure Storage SDK for JavaScript - Queue

  • 12.25.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
127K
decreased by-11.59%
Maintainers
5
Weekly downloads
 
Created

What is @azure/storage-queue?

@azure/storage-queue is an npm package that provides a client library for working with Azure Queue Storage, which is a service for storing large numbers of messages that can be accessed from anywhere in the world via authenticated calls using HTTP or HTTPS. This package allows you to create, delete, and manage queues, as well as add, retrieve, and delete messages within those queues.

What are @azure/storage-queue's main functionalities?

Create a Queue

This code sample demonstrates how to create a new queue in Azure Queue Storage using the @azure/storage-queue package.

const { QueueServiceClient } = require('@azure/storage-queue');
const connectionString = 'your_connection_string';
const queueServiceClient = QueueServiceClient.fromConnectionString(connectionString);
const queueClient = queueServiceClient.getQueueClient('myqueue');
await queueClient.create();
console.log('Queue created');

Add a Message to a Queue

This code sample demonstrates how to add a message to an existing queue in Azure Queue Storage.

const { QueueServiceClient } = require('@azure/storage-queue');
const connectionString = 'your_connection_string';
const queueServiceClient = QueueServiceClient.fromConnectionString(connectionString);
const queueClient = queueServiceClient.getQueueClient('myqueue');
await queueClient.sendMessage('Hello, World!');
console.log('Message added');

Retrieve Messages from a Queue

This code sample demonstrates how to retrieve messages from a queue in Azure Queue Storage.

const { QueueServiceClient } = require('@azure/storage-queue');
const connectionString = 'your_connection_string';
const queueServiceClient = QueueServiceClient.fromConnectionString(connectionString);
const queueClient = queueServiceClient.getQueueClient('myqueue');
const messages = await queueClient.receiveMessages();
for (const message of messages.receivedMessageItems) {
  console.log(`Message: ${message.messageText}`);
}

Delete a Message from a Queue

This code sample demonstrates how to delete a message from a queue in Azure Queue Storage.

const { QueueServiceClient } = require('@azure/storage-queue');
const connectionString = 'your_connection_string';
const queueServiceClient = QueueServiceClient.fromConnectionString(connectionString);
const queueClient = queueServiceClient.getQueueClient('myqueue');
const messages = await queueClient.receiveMessages();
for (const message of messages.receivedMessageItems) {
  await queueClient.deleteMessage(message.messageId, message.popReceipt);
  console.log('Message deleted');
}

Other packages similar to @azure/storage-queue

Keywords

FAQs

Package last updated on 20 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc