Source/EasyNetQ/IAdvancedBus.cs
/// <summary>
/// Publish a message as a .NET type
/// Task completes after publish has completed. If publisherConfirms=true is set in the connection string,
/// the task completes after an ACK is received. The task will throw on either NACK or timeout.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="exchange">The exchange to publish to</param>
/// <param name="routingKey">
/// The routing key for the message. The routing key is used for routing messages depending on the 
/// exchange configuration.</param>
/// <param name="mandatory">
/// This flag tells the server how to react if the message cannot be routed to a queue. 
/// If this flag is true, the server will return an unroutable message with a Return method. 
/// If this flag is false, the server silently drops the message.
/// </param>
/// <param name="immediate">
/// This flag tells the server how to react if the message cannot be routed to a queue consumer immediately. 
/// If this flag is true, the server will return an undeliverable message with a Return method. 
/// If this flag is false, the server will queue the message, but with no guarantee that it will ever be consumed.
/// </param>
/// <param name="message">The message to publish</param>
Publish a message as a .NET type
Task completes after publish has completed. If publisherConfirms=true is set in the connection string,
the task completes after an ACK is received. The task will throw on either NACK or timeout.
Publish a message as a . NET type Task completes after publish has completed . If publisherConfirms = true is set in the connection string the task completes after an ACK is received . The task will throw on either NACK or timeout .
Task PublishAsync<T>(
            IExchange exchange, 
            string routingKey,
            bool mandatory,
            bool immediate,
            IMessage<T> message) where T : class;
Task PublishAsync < T > ( IExchange exchange , string routingKey , bool mandatory , bool immediate , IMessage < T > message ) where T : class ;
Publish a message as a .NET type
Task completes after publish has completed.
Publish a message as a . NET type Task completes after publish has completed .
exchange
IExchange
The exchange to publish to
The exchange to publish to
routingKey
string
The routing key for the message. The routing key is used for routing messages depending on the
exchange configuration.
The routing key for the message . The routing key is used for routing messages depending on the exchange configuration .
mandatory
bool
This flag tells the server how to react if the message cannot be routed to a queue.
If this flag is true, the server will return an unroutable message with a Return method.
If this flag is false, the server silently drops the message.
This flag tells the server how to react if the message cannot be routed to a queue . If this flag is true the server will return an unroutable message with a Return method . If this flag is false the server silently drops the message .
immediate
bool
This flag tells the server how to react if the message cannot be routed to a queue consumer immediately.
If this flag is true, the server will return an undeliverable message with a Return method.
If this flag is false, the server will queue the message, but with no guarantee that it will ever be consumed.
This flag tells the server how to react if the message cannot be routed to a queue consumer immediately . If this flag is true the server will return an undeliverable message with a Return method . If this flag is false the server will queue the message but with no guarantee that it will ever be consumed .
message
IMessage<T>
The message to publish
The message to publish
typeparam
None