ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId, "Consumer identity", null);
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName, "Consumer name", null);
if (isConsumerExisting(consumerId))
{
throw new DuplicateRegistrationException("A Consumer with identifier '" + consumerId + "' has already been registered.");
}
else
{
ConsumerSPI consumer = internalCreateConsumer(consumerId, consumerName);
internalAddConsumer(consumer);