Skip to content

Commit

Permalink
Merge pull request #1082 from Pliner/main
Browse files Browse the repository at this point in the history
Don't record consumers if topology recovery is off
  • Loading branch information
michaelklishin authored Oct 18, 2021
2 parents b2255b7 + dc228a2 commit cdd459c
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ internal void DeleteRecordedBinding(in RecordedBinding rb)

internal void RecordConsumer(in RecordedConsumer consumer)
{
if (!_factory.TopologyRecoveryEnabled)
{
return;
}

lock (_recordedEntitiesLock)
{
_recordedConsumers[consumer.ConsumerTag] = consumer;
Expand All @@ -184,6 +189,11 @@ internal void RecordConsumer(in RecordedConsumer consumer)

internal void DeleteRecordedConsumer(string consumerTag)
{
if (!_factory.TopologyRecoveryEnabled)
{
return;
}

lock (_recordedEntitiesLock)
{
if (_recordedConsumers.Remove(consumerTag, out var recordedConsumer))
Expand Down

0 comments on commit cdd459c

Please sign in to comment.