Skip to content

Commit

Permalink
Add OverrideExchangeName()
Browse files Browse the repository at this point in the history
  • Loading branch information
YarinOmesi committed Sep 2, 2023
1 parent 50d3e34 commit bb58af8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,11 @@ void Bind<T>(Action<IRabbitMqExchangeBindingConfigurator> callback = null)
/// </summary>
/// <param name="consumerTag">The consumer tag to use for this receive endpoint.</param>
void OverrideConsumerTag(string consumerTag);

/// <summary>
/// By default, the exchange and queue name would be same
/// </summary>
/// <param name="exchangeName">The new exchange name for this endpoint</param>
void OverrideExchangeName(string exchangeName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ public void OverrideConsumerTag(string consumerTag)
_settings.ConsumerTag = consumerTag;
}

public void OverrideExchangeName(string exchangeName)
{
_settings.ExchangeName = exchangeName;
}

RabbitMqReceiveEndpointContext CreateRabbitMqReceiveEndpointContext()
{
var builder = new RabbitMqReceiveEndpointBuilder(_hostConfiguration, this);
Expand Down

0 comments on commit bb58af8

Please sign in to comment.