/// <summary>
        /// Publishes the specified <paramref name="payload"/> on the underlying message bus.
        /// </summary>
        /// <param name="headers">The set of message headers associated with the event.</param>
        /// <param name="payload">The event payload to be published.</param>
        public void Publish(IEnumerable<Header> headers, EventEnvelope payload)
        {
            Verify.NotNull(payload, nameof(payload));

            Log.Trace("Publishing {0} from {1}", payload.Event, payload.AggregateId);

            messageSender.Send(messageFactory.Create(headers, payload));
        }
Example #2
0
        /// <summary>
        /// Publishes the specified <paramref name="payload"/> on the underlying message bus.
        /// </summary>
        /// <param name="headers">The set of message headers associated with the event.</param>
        /// <param name="payload">The event payload to be published.</param>
        public void Publish(IEnumerable <Header> headers, EventEnvelope payload)
        {
            Verify.NotNull(payload, nameof(payload));

            Log.Trace("Publishing {0} from {1}", payload.Event, payload.AggregateId);

            messageSender.Send(messageFactory.Create(headers, payload));
        }
 /// <summary>
 /// Publishes the specified <paramref name="payload"/> on the underlying message bus.
 /// </summary>
 /// <param name="headers">The set of message headers associated with the event.</param>
 /// <param name="payload">The event payload to be published.</param>
 public void Publish(IEnumerable<Header> headers, EventEnvelope payload)
 {
     statistics.IncrementQueuedEvents();
     bus.Publish(headers, payload);
 }