Skip to content

Commit

Permalink
(#45): Remove convention for 'RpcExchange'
Browse files Browse the repository at this point in the history
Rpc will allways be performed over the default exchange.
  • Loading branch information
par.dahlman committed Mar 5, 2016
1 parent ce95d7a commit 534b174
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/RawRabbit/Common/ConfigurationEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ResponderConfiguration GetConfiguration<TRequest, TResponse>(Action<IResp

var exchangeConfig = new ExchangeConfiguration(_clientConfig.Exchange)
{
ExchangeName = _conventions.RpcExchangeNamingConvention(typeof(TRequest), typeof(TResponse)),
ExchangeName = _conventions.ExchangeNamingConvention(typeof(TRequest))
};

var builder = new ResponderConfigurationBuilder(queueConfig, exchangeConfig);
Expand All @@ -90,7 +90,7 @@ public RequestConfiguration GetConfiguration<TRequest, TResponse>(Action<IReques

var exchangeConfig = new ExchangeConfiguration(_clientConfig.Exchange)
{
ExchangeName = _conventions.RpcExchangeNamingConvention(typeof(TRequest), typeof(TResponse))
ExchangeName = _conventions.ExchangeNamingConvention(typeof(TRequest))
};

var defaultConfig = new RequestConfiguration
Expand Down
2 changes: 0 additions & 2 deletions src/RawRabbit/Common/NamingConventions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public interface INamingConventions
{
Func<Type, string> ExchangeNamingConvention { get; set; }
Func<Type, string> QueueNamingConvention { get; set; }
Func<Type, Type, string> RpcExchangeNamingConvention { get; set; }
Func<string> ErrorExchangeNamingConvention { get; set; }
Func<string> ErrorQueueNamingConvention { get; set; }
Func<string> DeadLetterExchangeNamingConvention { get; set; }
Expand Down Expand Up @@ -40,7 +39,6 @@ public NamingConventions()
_applicationName = GetApplicationName(Environment.CommandLine);

ExchangeNamingConvention = type => type?.Namespace?.ToLower() ?? string.Empty;
RpcExchangeNamingConvention = (request, response) => request?.Namespace?.ToLower() ?? "default_rpc_exchange";
QueueNamingConvention = type => CreateShortAfqn(type);
ErrorQueueNamingConvention = () => "default_error_queue";
ErrorExchangeNamingConvention = () => "default_error_exchange";
Expand Down

0 comments on commit 534b174

Please sign in to comment.