Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@zwolf/turbine-driver-aws-fanout

stayradiated25MIT4.4.0TypeScript support: included

Turbine driver using for SQS/SNS queues via aws-faonut

readme

Turbine

A minimal library for event based microservices

import createService from '@zwolf/turbine'
import createAmqpDriver from '@zwolf/turbine-driver-amqplib'

const service = createService({
  serviceName: 'scheduler',
  driver: createAmqpDriver({url: 'amqp://localhost'})
})

service.handle('schedule', (message, dispatch) => {
  const { payload } = message
  const { scheduledAt, messageToDispatch } = payload

  const delay = Date.now() - scheduledAt

  setTimeout(() => {
    dispatch({
      type: messageToDispatch.type,
      payload: messageToDispatch.payload
    })
  }, delay)
})

service.start()
  .then(() => console.log('Service has started'))
  .catch(console.error)

Installation

You will need the core turbine service.

npm install --save @zwolf/turbine

As well as a driver to use.

  • @zwolf/turbine-driver-amqplib
  • @zwolf/turbine-driver-aws-fanout
  • @zwolf/turbine-driver-mock

Development

git clone https://github.com/stayradiated/zwolf-turbine
npm install
npm run bootstrap
npm run build

Publishing

When publishing changes, you should not use npm publish manually.

Instead use:

npm run deploy

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

4.4.0 (2020-04-14)

Features

  • turbine-event: do not pass errors upstream (1d849f4)

4.0.0 (2020-02-13)

Features

  • turbine-driver-google-cloud-pubsub: allow custom express server to be used (4b65f08)

BREAKING CHANGES

  • turbine-driver-google-cloud-pubsub: The driver no longer returns the "server" property

3.7.0 (2020-02-02)

Note: Version bump only for package @zwolf/turbine-driver-aws-fanout

3.5.0 (2020-02-01)

Note: Version bump only for package @zwolf/turbine-driver-aws-fanout

3.4.5 (2020-02-01)

Note: Version bump only for package @zwolf/turbine-driver-aws-fanout

3.4.4 (2020-02-01)

Note: Version bump only for package @zwolf/turbine-driver-aws-fanout

3.4.3 (2020-02-01)

Note: Version bump only for package @zwolf/turbine-driver-aws-fanout

3.4.2 (2020-02-01)

Note: Version bump only for package @zwolf/turbine-driver-aws-fanout

3.4.1 (2020-02-01)

Note: Version bump only for package @zwolf/turbine-driver-aws-fanout

3.0.0 (2020-01-28)

Features

  • turbine-driver-google-cloud-pubsub: support ackDeadlineSeconds (75a025a)

BREAKING CHANGES

  • turbine-driver-google-cloud-pubsub: turbine has renamed events to subscriptionHandlers and replaces the [type, handlerFn] tuple with the object {type, handlerFn}.

2.2.0 (2020-01-26)

Note: Version bump only for package @zwolf/turbine-driver-aws-fanout