Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public override bool AutoStartSendingAgent()
return base.AutoStartSendingAgent() || ExchangeType == ExchangeType.Topic;
}

public bool DisableAutoProvision { get; set; }

public bool HasDeclared { get; private set; }

public string DeclaredName { get; }
Expand Down Expand Up @@ -72,7 +74,7 @@ public override async ValueTask InitializeAsync(ILogger logger)
return;
}

if (_parent.AutoProvision)
if (_parent.AutoProvision && !DisableAutoProvision)
{
await _parent.WithAdminChannelAsync(model => DeclareAsync(model, logger));
}
Expand All @@ -92,7 +94,7 @@ internal override string RoutingKey()

internal async Task DeclareAsync(IChannel channel, ILogger logger)
{
if (DeclaredName == string.Empty)
if (HasDeclared || DeclaredName == string.Empty)
{
return;
}
Expand Down