public IMessageConsumer CreateMessageConsumer(string queueName) { if (string.IsNullOrWhiteSpace(CurrentServer)) { throw new InvalidOperationException(ERROR_SERVER_IS_NOT_DEFINED); } Guid brokerId = SqlScripts.ExecuteScalar <Guid>(ConnectionString, SqlScripts.SelectServiceBrokerIdentifierScript()); string queueFullName = SqlScripts.CreateQueueName(brokerId, queueName); return(new MessageConsumer(CurrentServer, queueFullName)); }