1.0.14 • Published 3 years ago

fusion-helper-queue-manager v1.0.14

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Fusion Helper Queue Manager

This is a library that the fusion helper application uses to connect to its azure storage queue. It also pushes messages to the specified queue and dequeues messages so the azure functions can process the messages one at a time.

Installation

Using npm:

npm i --save fusion-helper-queue-manager

Usage

The package contains two objects

  1. FusionHelperQueueService
  2. FusionHelperQueueMessage

    1. fileName - the name of the file stored in the database that contains the request.

FusionHelperQueueService

This is the main service used to communicate with the fusion helper storage queue.

Creating an Instance

import { Fusion } from "fusion-helper-queue-manager";
const queueSvc = new FusionHelperQueueService(storageConnectionString, queueName)
  1. StorageConnectionString - This is the connection string to the storage account containing your queue
  2. queueName - This is the queue name of the queue used to transfer messages between applications/services.

Using The Instance - Write a Message

const message = await queueSvc.queue(fileName);

Using The Instance - Receive Messages

const receivedMessage = await queueSvc.deque(messageCount, deleteMessages);

messageCount (number) - defaults to 1 if no value is passed. Tells the service how many messages to pull from the queue.

deleteMessages (boolean) - tells the service to delete the messages or keep them on the stack.

FusionHelperQueueMessage

his is what you would expect to get back from a call to get a message. It is a JSON serialized object.

fileName This is the only property in the object. It contains the file name associated to the rows we need to process.

const fileName = message.fileName;
1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago