forked from MassTransit/MassTransit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce7170f
commit cad9e16
Showing
5 changed files
with
41 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
...bbitMqTransport/Configuration/Topology/BaseExchangeToQueueBindingTopologySpecification.cs
This file was deleted.
Oops, something went wrong.
19 changes: 16 additions & 3 deletions
19
...port/Configuration/Topology/Consume/ExchangeToQueueBindingConsumeTopologySpecification.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,33 @@ | ||
namespace MassTransit.RabbitMqTransport.Configuration | ||
{ | ||
using System.Collections.Generic; | ||
using Topology; | ||
|
||
|
||
/// <summary> | ||
/// Used to bind an exchange to the consuming queue's exchange | ||
/// </summary> | ||
public class ExchangeToQueueBindingConsumeTopologySpecification : BaseExchangeToQueueBindingTopologySpecification, | ||
public class ExchangeToQueueBindingConsumeTopologySpecification : ExchangeQueueBindingConfigurator, | ||
IRabbitMqConsumeTopologySpecification | ||
{ | ||
public ExchangeToQueueBindingConsumeTopologySpecification(string exchangeName, string exchangeType, string queueName = null, bool durable = true, | ||
bool autoDelete = false) | ||
: base(exchangeName, exchangeType, queueName, durable, autoDelete) | ||
: base(exchangeName, queueName ?? exchangeName, exchangeType, durable, autoDelete) | ||
{ | ||
} | ||
|
||
public void Apply(IReceiveEndpointBrokerTopologyBuilder builder) => ApplyTopologyToBuilder(builder); | ||
public IEnumerable<ValidationResult> Validate() | ||
{ | ||
yield break; | ||
} | ||
|
||
public void Apply(IReceiveEndpointBrokerTopologyBuilder builder) | ||
{ | ||
var exchangeHandle = builder.ExchangeDeclare(ExchangeName, ExchangeType, Durable, AutoDelete, ExchangeArguments); | ||
|
||
var queueHandle = builder.QueueDeclare(QueueName, Durable, AutoDelete, Exclusive, QueueArguments); | ||
|
||
var bindingHandle = builder.QueueBind(exchangeHandle, queueHandle, RoutingKey, BindingArguments); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters