Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
YarinOmesi committed Sep 2, 2023
1 parent c195bdd commit 6c62f0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public RabbitMqDeadLetterSettings(ReceiveSettings source, string name)
: base(name, name, source.ExchangeType, source.Durable, source.AutoDelete)
{
foreach (KeyValuePair<string, object> argument in source.ExchangeArguments)
ExchangeConfigurator.SetExchangeArgument(argument.Key, argument.Value);
SetExchangeArgument(argument.Key, argument.Value);

foreach (KeyValuePair<string, object> argument in source.QueueArguments)
QueueConfigurator.SetQueueArgument(argument.Key, argument.Value);
SetQueueArgument(argument.Key, argument.Value);
}

public BrokerTopology GetBrokerTopology()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,19 @@ public RabbitMqErrorSettings(ReceiveSettings source, string name)
: base(name, name, source.ExchangeType, source.Durable, source.AutoDelete)
{
foreach (KeyValuePair<string, object> argument in source.ExchangeArguments)
ExchangeConfigurator.SetExchangeArgument(argument.Key, argument.Value);
SetExchangeArgument(argument.Key, argument.Value);

foreach (KeyValuePair<string, object> argument in source.QueueArguments)
QueueConfigurator.SetQueueArgument(argument.Key, argument.Value);
SetQueueArgument(argument.Key, argument.Value);
}

public BrokerTopology GetBrokerTopology()
{
var builder = new PublishEndpointBrokerTopologyBuilder();

builder.Exchange = builder.ExchangeDeclare(
ExchangeConfigurator.ExchangeName,
ExchangeConfigurator.ExchangeType,
ExchangeConfigurator.Durable,
ExchangeConfigurator.AutoDelete,
ExchangeConfigurator.ExchangeArguments);

var queue = builder.QueueDeclare(
QueueConfigurator.QueueName,
QueueConfigurator.Durable,
!QueueConfigurator.QueueExpiration.HasValue && QueueConfigurator.AutoDelete,
false,
QueueConfigurator.QueueArguments);
builder.Exchange = builder.ExchangeDeclare(ExchangeName, ExchangeType, Durable, AutoDelete, ExchangeArguments);

var queue = builder.QueueDeclare(QueueName, Durable, !QueueExpiration.HasValue && AutoDelete, false, QueueArguments);

builder.QueueBind(builder.Exchange, queue, RoutingKey, BindingArguments);

Expand Down

0 comments on commit 6c62f0f

Please sign in to comment.