/// <summary>
        /// Creates an event publisher.
        /// </summary>
        /// <returns></returns>
        public IEventPublisher CreatePublisher(EventPublisherArgs eventPublisherArgs)
        {
            // construct the exchange name
            var publisherTopic = CreatePublisherTopic();
            // construct the publication address
            var publicationAddress = new PublicationAddress(
                ExchangeType.Topic, _exchangePath, publisherTopic);
            // construct the publisher
            var eventPublisher = new RabbitMqEventPublisher(_model, _exchangeAddr, publicationAddress);

            // connect the statement to the publisher
            eventPublisherArgs.Statement.Events += (sender, eventArgs) => eventPublisher.SendEvent(eventArgs);
            // return the publisher
            return(eventPublisher);
        }
 /// <summary>
 /// Creates an event publisher.
 /// </summary>
 /// <returns></returns>
 public IEventPublisher CreatePublisher(EventPublisherArgs eventPublisherArgs)
 {
     // construct the exchange name
     var publisherTopic = CreatePublisherTopic();
     // construct the publication address
     var publicationAddress = new PublicationAddress(
         ExchangeType.Topic, _exchangePath, publisherTopic);
     // construct the publisher
     var eventPublisher = new RabbitMqEventPublisher(_model, _exchangeAddr, publicationAddress);
     // connect the statement to the publisher
     eventPublisherArgs.Statement.Events += (sender, eventArgs) => eventPublisher.SendEvent(eventArgs);
     // return the publisher
     return eventPublisher;
 }