AzureServiceBus Transport no longer supports setting PrefetchCount to zero

Hey,

one of your teams that upgraded to the newest version of the transport reported that disabling message prefetch is no longer possible, which contradicts the documentation:

To disable prefetching, prefetch count should be set to zero.

Starting with version 5 of the transport, the PrefetchCount property throws on negative or zero values: NServiceBus.Transport.AzureServiceBus/src/Transport/AzureServiceBusTransport.cs at master · Particular/NServiceBus.Transport.AzureServiceBus · GitHub

Is it no longer supported to disable prefetching or how should the new setup look like?

I suspect it’s a copy/paste bug and the method used should be ThrowIfNegative<T>(T, String).

Agree with @SeanFeldman that is probably a copy-paste bug that slipped through the reviews. You are right; it should be possible to set the prefetch count to zero.

I have raised PrefetchCount cannot be set to zero · Issue #1264 · Particular/NServiceBus.Transport.AzureServiceBus · GitHub

1 Like

Hi Geri,

Hot off the press: NServiceBus.Transport.AzureServiceBus 5.0.4 and 5.1.2 – Patch releases available

Daniel

This topic was automatically closed after 4 days. New replies are no longer allowed.