Reputation: 1
When consuming messages from an SQS FIFO queue using a MassTransit Consumer, I find that the first message is constantly retieved separately from the rest of the messages in the batch.
I am currently using a message limit of 10, so when 10 messages are sent, the messages are consumed in 2 batches; one of size 1 and another of size 9. This pattern holds for any number: if 5 messages, it sends 1 & 4; with 11, it sends 1, 9, & 1. For 20, 1, 9, 1, & 9.
Its a very strange pattern. I have the SQS queue currently subscribed to an SNS topic getting one message at a time, and I am thinking this might be part of the problem.
I found out when I manually tried using the SQS' send-message-batch function directly (instead of going through the SNS topic, that the consumer gets the batch of 10 as it should rather than separated.
I see there is a PublishBatch API function for an SNS as well. I am now checking to see if using this helps change this behavior as well.
My consumer config is below:
ConcurrentMessageLimit = 1;
PrefetchCount = 20;
ConcurrentDeliveryLimit = 10;
MessageLimit = 10;
TimeLimit = 5; //seconds
ConcurrencyLimit = 1;
Upvotes: 0
Views: 79