/// <summary> /// Sets alternate exchange of the exchange. /// </summary> /// <param name="configuration">The configuration instance</param> /// <param name="alternateExchange">The alternate exchange to set</param> /// <returns>IQueueDeclareConfiguration</returns> public static IExchangeDeclareConfiguration WithAlternateExchange( this IExchangeDeclareConfiguration configuration, IExchange alternateExchange ) { Preconditions.CheckNotNull(configuration, "configuration"); return(configuration.WithArgument("alternate-exchange", alternateExchange.Name)); }
/// <summary> /// Marks an exchange as delayed /// </summary> /// <param name="configuration">The configuration</param> /// <param name="exchangeType">The exchange type</param> public static IExchangeDeclareConfiguration AsDelayedExchange( this IExchangeDeclareConfiguration configuration, string exchangeType = ExchangeType.Fanout ) { Preconditions.CheckNotNull(configuration, "configuration"); return(configuration.WithType("x-delayed-message") .WithArgument("x-delayed-type", exchangeType)); }