1.12.0 • Published 4 years ago

eventhub-ts v1.12.0

Weekly downloads
20
License
MIT
Repository
-
Last release
4 years ago

EventhubJS - Azure Eventhub Uplink

npm version

EventHub JS is a simple integration for Azure Eventhubs. Event Batching support is built in from the start!

Install

npm install eventhub-ts

Usage

const eventhub = require('eventhub-ts');

const TOKEN = eventhub.createSASToken(eventhubNamespace, eventhubHubName, key, keyName);
const CLIENT = new eventhub.EventHubClient(TOKEN, {
  // Defaults:
  batching: true,
  batchSize: (1025 * 200),
  intervalTimer: 20
});

// Inherit from this class, to whatever is needed for your eventhub
let event = new eventhub.EventHubEvent();

CLIENT.send(event).then((result: boolean) => {
  // No return
}).catch((err) => {
  // Handle your error
});

Events

EventhubJS uses events to report on its status

CLIENT.on('sendBatch', () => {

});

added - An Event got added to its batch sendBatch - Batch was sent to Eventhub invalidToken - Authentication Rejected for SASToken httpErr - STATUSCODE - HTTP Error when sending events to eventhub

1.12.0

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.11.0

4 years ago

1.6.0

4 years ago

1.10.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago