public static void main()

in src/main/java/com/amazonaws/services/kinesis/aggregators/consumer/AggregatorConsumer.java [240:284]


	public static void main(String[] args) throws Exception {
		String streamName = System
				.getProperty(AggregatorsConstants.STREAM_NAME_PARAM);
		String appName = System
				.getProperty(AggregatorsConstants.APP_NAME_PARAM);
		String configFilePath = System
				.getProperty(AggregatorsConstants.CONFIG_PATH_PARAM);
		String regionName = System
				.getProperty(AggregatorsConstants.REGION_PARAM);
		String failuresToTolerate = System
				.getProperty(AggregatorsConstants.FAILURES_TOLERATED_PARAM);
		String maxRecords = System
				.getProperty(AggregatorsConstants.MAX_RECORDS_PARAM);
		String environmentName = System
				.getProperty(AggregatorsConstants.ENVIRONMENT_PARAM);
		String positionInStream = System
				.getProperty(AggregatorsConstants.STREAM_POSITION_PARAM);

		AggregatorConsumer consumer = new AggregatorConsumer(streamName,
				appName, configFilePath);

		// add optional configuration items
		if (regionName != null && regionName != "") {
			consumer.withRegionName(regionName);
		}

		if (failuresToTolerate != null && failuresToTolerate != "") {
			consumer.withToleratedWorkerFailures(Integer
					.parseInt(failuresToTolerate));
		}

		if (maxRecords != null && maxRecords != "") {
			consumer.withMaxRecords(Integer.parseInt(maxRecords));
		}

		if (environmentName != null && environmentName != "") {
			consumer.withEnvironment(environmentName);
		}

		if (positionInStream != null && positionInStream != "") {
			consumer.withInitialPositionInStream(positionInStream);
		}

		System.exit(consumer.run());
	}