Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for DynamoDB setup #226

Open
chrkaatz opened this issue Sep 5, 2019 · 5 comments
Open

Add documentation for DynamoDB setup #226

chrkaatz opened this issue Sep 5, 2019 · 5 comments
Assignees

Comments

@chrkaatz
Copy link

chrkaatz commented Sep 5, 2019

Hey,

I was about to try your library which looks very promising. Could you add some kind of information on how to setup the DynamoDB and what would be the primaryKey for it?

I cannot initialize the kinesis consumer

const Kinesis = require('lifion-kinesis');
const streamName = 'testStream';
const logger = require('tracer).console({level:'debug'});

const kinesisConsumer = new Kinesis({
  apiVersion: '2013-12-02',
  region: 'eu-central-1',
  streamName,
  createStreamIfNeeded: false,
  useAutoCheckpoints: true,
  maxRetries: 5,
  dynamoDb: {
    apiVersion: '2012-08-10',
    region: 'eu-central-1',
    tableName: 'lifion-kinesis-state',
  },
  useEnhancedFanOut: false,
  logger,
});
kinesisConsumer.on('data', data => {
  console.log('Incoming data:', data);
});
kinesisConsumer.on('error', err => {
  logger.error(err);
});
kinesisConsumer.on('stats', stats => {
  logger.info(stats);
});
kinesisConsumer
  .startConsumer()
  .then(() => {
    logger.info('consumer started');
  })
  .catch(err => logger.error);

2019-09-05T13:21:51+0200 stream.js:143 (ensureStreamExists) Verifying the "testStream" stream exists and it's active…
2019-09-05T13:21:51+0200 stream.js:161 (ensureStreamExists) The stream exists and it's active.
2019-09-05T13:21:51+0200 index.js:300 (Kinesis.startConsumer) Trying to start the consumer…
2019-09-05T13:21:51+0200 table.js:93 (ensureTableExists) Verifying the "lifion-kinesis-state" table exists and it's active…
2019-09-05T13:21:52+0200 table.js:130 (ensureTableExists) The table exists and it's active.

Unfortunately in never arrives at: logger.debug('The consumer is now ready.');

Can you help me?

@shaneblaserj2
Copy link

I have the same question

@eaviles eaviles self-assigned this Dec 12, 2019
@eaviles
Copy link
Member

eaviles commented Dec 18, 2019

@chrkaatz, @shaneblaserj2, I'm working on documenting this now. Should be available shortly.

@chrkaatz
Copy link
Author

@eaviles that would be amazing!

@eaviles
Copy link
Member

eaviles commented Apr 10, 2020

Thanks for your patience @chrkaatz, @shaneblaserj2, still working on this. Should have it up next week.

@paulyk1983
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants