mhart / kinesalite

An implementation of Amazon's Kinesis built on LevelDB
MIT License
808 stars 86 forks source link

How to use java KPL with Kinesalite ? Not able to set the endpoint #46

Closed imanzano closed 7 years ago

imanzano commented 7 years ago

I tried the following

final ProfileCredentialsProvider provider = new ProfileCredentialsProvider("default");
        final KinesisProducerConfiguration conf = new KinesisProducerConfiguration()
                                                    .setCredentialsProvider(provider)
                                                    .setKinesisEndpoint("localhost:7010")
                                                    .setRegion("");
        return new KinesisProducer(conf);

But it doesn't work, because it said that KinesisProducer is not able to verify the kinesis endpoint. It fails because I can't set the port. KinesisProducerConfiguration run a regular expression in order to check that the endpoint is valid.

Expected pattern: ^([A-Za-z0-9-\.]+)?$

So, no protocol and port are valid in the endpoint.

Any Idea how can I set the endpoint with the port ? or which port I have to use when I start kinesalite

thanks

imanzano commented 7 years ago

Sorry, I didn't see the setKinesisPort method.