We are using SQL transport with NSB 5, Want to understand few details with respect to SQL transport & performance. I have gone through documents at SQL Server transport • Particular Docs
NSB execute below query to poll queue.
WITH message AS (SELECT TOP(1) * FROM QueueName WITH (UPDLOCK, READPAST, ROWLOCK) ORDER BY [RowVersion] ASC)
DELETE FROM message
OUTPUT deleted.Id, deleted.CorrelationId, deleted.ReplyToAddress,
deleted.Recoverable, CASE WHEN deleted.Expires IS NOT NULL THEN DATEDIFF(ms, GETUTCDATE(), deleted.Expires) END, deleted.Headers, deleted.Body;
Question :
As per document mentioned above, polling intervel is one second,
1.1 Does it mean each endpoint can read one message per second ? or its depends on number of thread or value of MaximumConcurrencyLevel ?
1.2 can we reduce polling interval to milliseconds ?
Ultimate goal is to process more number of messages parallel, please suggest on same.
No, this means that is checks every second if there are messages. If not, we sleep one second. If yes, the message is processed and after processing we immediately try to read the next message.
If you want to achieve parallelism then increase the maximum concurrency by specifying a value above 1. A good starting point is to use the number of CPU cores on the server.
so if i set value for Maximum concurrency to 8(having 8 core CPU) then it should pick 8 messages in a second , process those message parallel & will pick another message once done , is this correct ?
We are considering to migrate from nservicebus 5 to 6-7, can you please provide me changes been done with respect to performance improvement or can you please redirect me some documentation where performance improvement changes mentioned in latest release for core & SQL transport ? This will help us to take right decision.