private void prepare(String processingLanguage) { // Ensure the JVM will refresh the cached IP values of AWS resources (e.g. service endpoints). java.security.Security.setProperty("networkaddress.cache.ttl", "60"); LOG.info("Using workerId: " + kinesisClientLibConfig.getWorkerIdentifier()); LOG.info("Using credentials with access key id: " + kinesisClientLibConfig.getKinesisCredentialsProvider() .getCredentials().getAWSAccessKeyId()); StringBuilder userAgent = new StringBuilder(KinesisClientLibConfiguration.KINESIS_CLIENT_LIB_USER_AGENT); userAgent.append(" "); userAgent.append(USER_AGENT); userAgent.append("/"); userAgent.append(VERSION); if (processingLanguage != null) { userAgent.append(" "); userAgent.append(processingLanguage); } if (recordProcessorFactory.getCommandArray().length > 0) { userAgent.append(" "); userAgent.append(recordProcessorFactory.getCommandArray()[0]); } LOG.info(String.format("MultiLangDaemon is adding the following fields to the User Agent: %s", userAgent.toString())); kinesisClientLibConfig.withUserAgent(userAgent.toString()); }
.withMetricsBufferTimeMillis(kinesisConnectorConfiguration.CLOUDWATCH_BUFFER_TIME) .withMetricsMaxQueueSize(kinesisConnectorConfiguration.CLOUDWATCH_MAX_QUEUE_SIZE) .withUserAgent(kinesisConnectorConfiguration.APP_NAME + "," + kinesisConnectorConfiguration.CONNECTOR_DESTINATION + "," + KinesisConnectorConfiguration.KINESIS_CONNECTOR_USER_AGENT)
.withMetricsBufferTimeMillis(kinesisConnectorConfiguration.CLOUDWATCH_BUFFER_TIME) .withMetricsMaxQueueSize(kinesisConnectorConfiguration.CLOUDWATCH_MAX_QUEUE_SIZE) .withUserAgent(kinesisConnectorConfiguration.APP_NAME + "," + kinesisConnectorConfiguration.CONNECTOR_DESTINATION + "," + KinesisConnectorConfiguration.KINESIS_CONNECTOR_USER_AGENT)