Skip to content

Commit

Permalink
Keeping the responsibility for creating parallel listeners on Listeni…
Browse files Browse the repository at this point in the history
…ngAgent and not in Rabbit MQ itself. Closes GH-1152
  • Loading branch information
jeremydmiller committed Dec 2, 2024
1 parent e3906fd commit 8f9a716
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,19 +365,6 @@ public async ValueTask<IListener> BuildListenerAsync(IWolverineRuntime runtime,

private async Task<IListener> buildListener(IWolverineRuntime runtime, IReceiver receiver, RabbitMqQueue queue)
{
if (queue.ListenerCount > 1)
{
var listeners = new List<RabbitMqListener>(queue.ListenerCount);
for (var i = 0; i < queue.ListenerCount; i++)
{
var listener = new RabbitMqListener(runtime, queue, this, receiver);
await listener.CreateAsync();
listeners.Add(listener);
}

return new ParallelListener(queue.Uri, listeners);
}

var singleListener = new RabbitMqListener(runtime, queue, this, receiver);
await singleListener.CreateAsync();
return singleListener;
Expand Down

0 comments on commit 8f9a716

Please sign in to comment.