@@ -576,7 +576,7 @@ public void MaybeDeleteRecordedAutoDeleteExchange(string exchange)
576576 // last binding where this exchange is the source is gone,
577577 // remove recorded exchange
578578 // if it is auto-deleted. See bug 26364.
579- if ( ( rx != null ) && rx . IsAutoDelete )
579+ if ( ( rx != null ) && rx . AutoDelete )
580580 {
581581 DeleteRecordedExchange ( exchange ) ;
582582 }
@@ -593,7 +593,7 @@ public void MaybeDeleteRecordedAutoDeleteQueue(string queue)
593593 _recordedQueues . TryGetValue ( queue , out RecordedQueue rq ) ;
594594 // last consumer on this connection is gone, remove recorded queue
595595 // if it is auto-deleted. See bug 26364.
596- if ( ( rq != null ) && rq . IsAutoDelete )
596+ if ( ( rq != null ) && rq . AutoDelete )
597597 {
598598 DeleteRecordedQueue ( queue ) ;
599599 }
@@ -993,7 +993,7 @@ private void RecoverBindings(IModel model)
993993 recordedBindingsCopy = new Dictionary < RecordedBinding , byte > ( _recordedBindings ) ;
994994 }
995995
996- foreach ( RecordedBinding b in recordedBindingsCopy . Keys )
996+ foreach ( RecordedBinding b in recordedBindingsCopy . Keys . Where ( x => _factory . TopologyRecoveryFilter ? . BindingFilter ( x ) ?? true ) )
997997 {
998998 try
999999 {
@@ -1089,7 +1089,7 @@ internal void RecoverConsumers(AutorecoveringModel modelToRecover, IModel channe
10891089 recordedConsumersCopy = new Dictionary < string , RecordedConsumer > ( _recordedConsumers ) ;
10901090 }
10911091
1092- foreach ( KeyValuePair < string , RecordedConsumer > pair in recordedConsumersCopy )
1092+ foreach ( KeyValuePair < string , RecordedConsumer > pair in recordedConsumersCopy . Where ( x => _factory . TopologyRecoveryFilter ? . ConsumerFilter ( x . Value ) ?? true ) )
10931093 {
10941094 RecordedConsumer cons = pair . Value ;
10951095 if ( cons . Model != modelToRecover )
@@ -1154,7 +1154,7 @@ private void RecoverExchanges(IModel model)
11541154 recordedExchangesCopy = new Dictionary < string , RecordedExchange > ( _recordedExchanges ) ;
11551155 }
11561156
1157- foreach ( RecordedExchange rx in recordedExchangesCopy . Values )
1157+ foreach ( RecordedExchange rx in recordedExchangesCopy . Values . Where ( x => _factory . TopologyRecoveryFilter ? . ExchangeFilter ( x ) ?? true ) )
11581158 {
11591159 try
11601160 {
@@ -1188,7 +1188,7 @@ private void RecoverQueues(IModel model)
11881188 recordedQueuesCopy = new Dictionary < string , RecordedQueue > ( _recordedQueues ) ;
11891189 }
11901190
1191- foreach ( KeyValuePair < string , RecordedQueue > pair in recordedQueuesCopy )
1191+ foreach ( KeyValuePair < string , RecordedQueue > pair in recordedQueuesCopy . Where ( x => _factory . TopologyRecoveryFilter ? . QueueFilter ( x . Value ) ?? true ) )
11921192 {
11931193 string oldName = pair . Key ;
11941194 RecordedQueue rq = pair . Value ;
0 commit comments