@imaness/bus-azure-service-bus-queue
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

@imaness/bus-azure-service-bus-queue

An Azure Service Bus queue adapter for @node-ts/bus

🔥 View our docs at https://bus.node-ts.com 🔥

🤔 Have a question? Join our Discord 🤔

Installation

Install packages and their dependencies

npm i @imaness/bus-azure-service-bus-queue @node-ts/bus-core

Once installed, configure Bus to use this transport during initialization:

import { Bus } from '@node-ts/bus-core'
import { SBQTransport, SBQTransportConfiguration } from '@imaness/bus-azure-service-bus-queue'

const sbqConfiguration: SBQTransportConfiguration = {
  queueName: {Queue Name},
  serviceBusClient:  new ServiceBusClient(),
}

const sbqTransport = new SBQTransport(sbqConfiguration)

// Configure Bus to use Azure Service Bus Queue as a transport
const run = async () => {
  await Bus
    .configure()
    .withTransport(sbqTransport)
    .initialize()
}
run.catch(console.error)

Mapping of ApplicationProperties to Attributes and StickyAttributes

Azure Service Bus Queue supports Message Properties.

In order for you to map it to Attributes or StickyAttributes you need to add key prefix of either attributes or stickyAttributes. Those key that are not have the said prefixes will be considered as attributes.

Package Sidebar

Install

npm i @imaness/bus-azure-service-bus-queue

Weekly Downloads

0

Version

1.2.4

License

MIT

Unpacked Size

24.1 kB

Total Files

19

Last publish

Collaborators

  • imaness