lifion-kinesis
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -10,2 +10,6 @@ ## Changelog | ||
### v1.0.4 (2019-04-29) | ||
- [`83c8b5f`](https://github.com/lifion/lifion-kinesis/commit/83c8b5f13edcd2d4f628ca8a8308a5093d99c1a4): Tweak timeouts for leasing and heartbeats | ||
### v1.0.3 (2019-04-29) | ||
@@ -12,0 +16,0 @@ |
'use strict'; | ||
const HEARTBEAT_INTERVAL = 10 * 1000; | ||
const HEARTBEAT_FAILURE_TIMEOUT = HEARTBEAT_INTERVAL * 3; | ||
const HEARTBEAT_INTERVAL = 30 * 1000; | ||
const HEARTBEAT_FAILURE_TIMEOUT = HEARTBEAT_INTERVAL * 2; | ||
@@ -6,0 +6,0 @@ const privateData = new WeakMap(); |
'use strict'; | ||
const ACQUIRE_LEASES_INTERVAL = 10 * 1000; | ||
const LEASE_TERM_TIMEOUT = 60 * 1000; | ||
const ACQUIRE_LEASES_INTERVAL = 30 * 1000; | ||
const LEASE_TERM_TIMEOUT = 5 * 60 * 1000; | ||
const LEASE_RENEWAL_OFFSET = ACQUIRE_LEASES_INTERVAL * 3; | ||
@@ -6,0 +6,0 @@ |
{ | ||
"name": "lifion-kinesis", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Lifion client for Amazon Kinesis Data streams", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -18,10 +18,10 @@ # lifion-kinesis | ||
const client = new Kinesis({ | ||
streamName: 'sample-stream', | ||
consumerName: 'sample-consumer' | ||
const kinesis = new Kinesis({ | ||
streamName: 'sample-stream' | ||
/* other options from AWS.Kinesis */ | ||
}); | ||
client.on('data', chunk => { | ||
kinesis.on('data', chunk => { | ||
console.log('Incoming data:', chunk); | ||
}); | ||
kinesis.startConsumer(); | ||
``` | ||
@@ -28,0 +28,0 @@ |
137575