Skip to content

Commit

Permalink
using validating model in all places
Browse files Browse the repository at this point in the history
  • Loading branch information
tmasternak authored and bording committed Jul 8, 2020
1 parent 4cf8f7a commit b5d93fc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public QueueCreator(ConnectionFactory connectionFactory, IRoutingTopology routin
public Task CreateQueueIfNecessary(QueueBindings queueBindings, string identity)
{
using (var connection = connectionFactory.CreateAdministrationConnection())
using (var channel = connection.CreateModel())
using (var channel = new ModelWithValidation(connection.CreateModel()))
{
DelayInfrastructure.Build(channel);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public QueuePurger(ConnectionFactory connectionFactory)
public void Purge(string queue)
{
using (var connection = connectionFactory.CreateAdministrationConnection())
using (var channel = connection.CreateModel())
using (var channel = new ModelWithValidation(connection.CreateModel()))
{
channel.QueuePurge(queue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public SubscriptionManager(ConnectionFactory connectionFactory, IRoutingTopology
public Task Subscribe(Type eventType, ContextBag context)
{
using (var connection = connectionFactory.CreateAdministrationConnection())
using (var channel = connection.CreateModel())
using (var channel = new ModelWithValidation(connection.CreateModel()))
{
routingTopology.SetupSubscription(channel, eventType, localQueue);
}
Expand All @@ -31,7 +31,7 @@ public Task Subscribe(Type eventType, ContextBag context)
public Task Unsubscribe(Type eventType, ContextBag context)
{
using (var connection = connectionFactory.CreateAdministrationConnection())
using (var channel = connection.CreateModel())
using (var channel = new ModelWithValidation(connection.CreateModel()))
{
routingTopology.TeardownSubscription(channel, eventType, localQueue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void Start(PushRuntimeSettings limitations)

connection = connectionFactory.CreateConnection($"{settings.InputQueue} MessagePump");

var channel = connection.CreateModel();
var channel = new ModelWithValidation(connection.CreateModel());

long prefetchCount;

Expand Down

0 comments on commit b5d93fc

Please sign in to comment.