Skip to content

Commit 5ca1dfa

Browse files
author
John Simons
committed
Moved purge to Init
1 parent f95adae commit 5ca1dfa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/NServiceBus.RabbitMQ/RabbitMqDequeueStrategy.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public void Init(Address address, TransactionSettings transactionSettings, Func<
4646
this.endProcessMessage = endProcessMessage;
4747
workQueue = address.Queue;
4848
autoAck = !transactionSettings.IsTransactional;
49+
50+
if (PurgeOnStartup)
51+
{
52+
Purge();
53+
}
4954
}
5055

5156
/// <summary>
@@ -57,11 +62,6 @@ public void Init(Address address, TransactionSettings transactionSettings, Func<
5762
/// </param>
5863
public void Start(int maximumConcurrencyLevel)
5964
{
60-
if (PurgeOnStartup)
61-
{
62-
Purge();
63-
}
64-
6565
tokenSource = new CancellationTokenSource();
6666
countdownEvent = new CountdownEvent(maximumConcurrencyLevel);
6767

0 commit comments

Comments
 (0)