Add replication factor

Add support for setting the REPLICATION_FACTOR in both the relay and aggregator configuration.