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

notification-processor

Package Overview
Dependencies
Maintainers
0
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notification-processor

notification-processor

  • 4.23.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

notification-processor

NPM version

Breaking change

  • Configure API URL and Notification API URL at job processor
//2.x
require("notification-processor").JobProcessor({
    buildOpts: (message) => ({}), notificationApiUrl: "apiNotificationUrl"
})

//3.x
require("notification-processor").JobProcessor({
    apiUrl: "",
    notificationApiUrl: ""
})

New Features

  • Adding request async processor
require("notification-processor").RequestAsyncProcessor({
    apiUrl: "baseAPI..."
    silentErrors: []
})

Migrating 1.x -> 2.x

Deadletter Processor

// 1.x
const buildOpts = (message) => { return ....  }
deadletterProcessor = DeadletterProcessor({
    connection: connection,
    name: "aFunctionName",
    maxDequeueCount: 1,
    rowKeyGenerator: (message) => { return ...... }
}, processor())

// 2.x
const buildOpts = (message) => { return ....  }
const sender = {
    resource: (notification) => { return ... }
    user: (notification) => { return ... }
}

deadletterProcessor = DeadletterProcessor({
    connection: connection,
    name: "aFunctionName",
    maxDequeueCount: 1,
    sender: sender
}, processor())

Job Processor


// 1.x
const buildOpts = (message) => { return ....  }
const processor = JobsProcessor(buildOpts, nonRetryable)

// 2.x
const buildOpts = ({ message }) => { return ...... }
const processor = JobsProcessor({
    buildOpts: optionsGenerator,
    maxRetries,
    nonRetryable
})

To publish

npm version [major/minor/patch]
npm publish
git push origin HEAD
git push origin HEAD --tags

FAQs

Package last updated on 02 Aug 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