Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmazonSQS Retrying messages fails with InvalidBatchEntryIdException #1636

Closed
danielmarbach opened this issue May 2, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@danielmarbach
Copy link
Member

commented May 2, 2019

Who's affected

All customers using ServiceControl 3.7 with AmazonSQS

Symptoms

When trying to retry messages that were moved to the error queue the retry operations fail with

Amazon.SQS.Model.InvalidBatchEntryIdException: A batch entry id can only contain alphanumeric characters, hyphens and underscores. It can be at most 80 letters long. ---> Amazon.Runtime.Internal.HttpErrorResponseException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.

Analysis

NServiceBus.AmazonSQS introduced a batching capability. The batching capability uses the MessageId as a batch id. The batch ID though is restricted to

/// <param name="id">An identifier for a message in this batch used to communicate the result. <note> The <code>Id</code>s of a batch request need to be unique within a request This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_). </note></param>

the staging mechanism uses document IDs as message ids which contain forward slashes.

17:49:49.6345|173|Error|NServiceBus.Transports.SQS.MessageDispatcher|Error while sending batch '1/1', with message ids 'FailedMessages/0b49c4e2-0e9b-411a-0c61-c9c979430a63', to 'Particular.ServiceControl.staging'

@danielmarbach danielmarbach added the Bug label May 2, 2019

@danielmarbach danielmarbach changed the title Retrying messages fails with AmazonSQS with InvalidBatchEntryIdException AmazonSQS Retrying messages fails with InvalidBatchEntryIdException May 2, 2019

@danielmarbach danielmarbach added this to the 3.7.1 milestone May 3, 2019

@danielmarbach

This comment has been minimized.

Copy link
Member Author

commented May 3, 2019

Fixed as part of 29e9e05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.