Package com.amazonaws.services.kinesis.clientlibrary.lib.worker

Examples of com.amazonaws.services.kinesis.clientlibrary.lib.worker.KinesisClientLibConfiguration


            LOG.info("Obtained credentials from the properties file.");
        }

        LOG.info("Using credentials with access key id: " + credentialsProvider.getCredentials().getAWSAccessKeyId());

        kinesisClientLibConfiguration = new KinesisClientLibConfiguration(applicationName, streamName,
                credentialsProvider, workerId).withInitialPositionInStream(initialPositionInStream);
    }
View Full Code Here


     * @param kinesisConnectorConfiguration Amazon Kinesis connector configuration
     * @param metricFactory would be used to emit metrics in Amazon Kinesis Client Library
     */
    protected void
            initialize(KinesisConnectorConfiguration kinesisConnectorConfiguration, IMetricsFactory metricFactory) {
        KinesisClientLibConfiguration kinesisClientLibConfiguration =
                new KinesisClientLibConfiguration(kinesisConnectorConfiguration.APP_NAME,
                        kinesisConnectorConfiguration.KINESIS_INPUT_STREAM,
                        kinesisConnectorConfiguration.AWS_CREDENTIALS_PROVIDER,
                        kinesisConnectorConfiguration.WORKER_ID).withKinesisEndpoint(kinesisConnectorConfiguration.KINESIS_ENDPOINT)
                        .withFailoverTimeMillis(kinesisConnectorConfiguration.FAILOVER_TIME)
                        .withMaxRecords(kinesisConnectorConfiguration.MAX_RECORDS)
View Full Code Here

        }

        if (validateProperties(properties)) {

            // Configuration
            KinesisClientLibConfiguration kinesisClientLibConfiguration =
                    new KinesisClientLibConfigurator().getConfiguration(properties);
            String executableName = properties.getProperty(PROP_EXECUTABLE_NAME);

            ExecutorService executorService = getExecutorService(properties);

            // Factory
            MultiLangRecordProcessorFactory recordProcessorFactory =
                    new MultiLangRecordProcessorFactory(executableName, executorService);

            // Daemon
            MultiLangDaemon daemon =
                    new MultiLangDaemon(properties.getProperty(PROP_PROCESSING_LANGUAGE),
                            kinesisClientLibConfiguration, recordProcessorFactory, executorService);

            LOG.info("Running " + kinesisClientLibConfiguration.getApplicationName() + " to process stream "
                    + kinesisClientLibConfiguration.getStreamName() + " with executable " + executableName);

            Future<Integer> future = executorService.submit(daemon);
            try {
                System.exit(future.get());
            } catch (InterruptedException | ExecutionException e) {
View Full Code Here

            workerId = UUID.randomUUID().toString();
            LOG.info("Value of workerId is not provided in the properties. WorkerId is automatically "
                    + "assigned as: " + workerId);
        }

        KinesisClientLibConfiguration config =
                new KinesisClientLibConfiguration(applicationName, streamName, provider, workerId);

        Set<String> requiredNames =
                new HashSet<String>(Arrays.asList(PROP_STREAM_NAME,
                        PROP_APP_NAME,
                        PROP_WORKER_ID,
View Full Code Here

TOP

Related Classes of com.amazonaws.services.kinesis.clientlibrary.lib.worker.KinesisClientLibConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.