Adding items to queue using BulkAddQueueItems fails with an error message Maximum length exceeded. Error code: 1000
Issue Description
When a Datatable with a large number of records is given as input to BulkAddQueueItems it fails with an error message: "Maximum length exceeded. Error code: 1000".
Root Cause
- There is a limit of 50 MB on the payload size imposed from the back end.
- There are other limitations, read more here: Queue items large data fields.
Resolution
- Instead of sending all data at once to BulkAddQueueItems, send data in small batches.
- Based on the business requirements, the 'All or Nothing' or 'Process Independently' property option of BulkAddQueueItems needs to be set.
Note: If a fiddler trace is captured, you will see an error code: