@dazn/lambda-powertools-sqs-client
TypeScript icon, indicating that this package has built-in type declarations

1.28.1 • Public • Published

lambda-powertools-sqs-client

SQS client wrapper that knows how to forward correlation IDs (captured via @dazn/lambda-powertools-correlation-ids).

Main features:

  • direct replacement for AWS.SQS client
  • auto-injects correlation IDs into SQS message when you call sendMessage or sendMessageBatch
  • allow correlation IDs to be overriden with sendMessageWithCorrelationIds and sendMessageBatchWithCorrelationIds (useful when processing batch-based event sources such as SQS and Kinesis, where every record has its own set of correlation IDs)

Getting Started

Install from NPM: npm install @dazn/lambda-powertools-sqs-client

API

It's exactly the same as the SQS client from the AWS SDK.

const SQS = require('@dazn/lambda-powertools-sqs-client')

const sendMessage = async () => {
  const req = {
    MessageBody: JSON.stringify({ message: 'hello sqs' }),
    QueueUrl: 'my-sqs-queue'
  }

  await SQS.sendMessage(req).promise()
}

Readme

Keywords

none

Package Sidebar

Install

npm i @dazn/lambda-powertools-sqs-client

Weekly Downloads

1,655

Version

1.28.1

License

MIT

Unpacked Size

16 kB

Total Files

7

Last publish

Collaborators

  • gideonparanoid
  • davidrv87
  • gabriela_nowicka
  • criveindazn
  • dazn.builder.frontend
  • automation-drone
  • m.bazalik
  • dazn.oss.lambda.powertools