Error Encoding Batch Market Item Request

I an using the batch feature when seding a market price item request message using the UPA api. I am getting the following error when calling rsslEncodeElementEntryComplete, which follows the encoding of the array of item names in the batch:

rsslEncodeElementEntryComplete() failed with return code: RSSL_RET_INVALID_DATA (-29) Error Text: Failure: Invalid data provided to function.­

I get this error when I have a large number of iterms in the batch (>8500). My batch request will works with an iterm count less than this number. It's not clear to me from the error what data is invalid. There are only two parameters passed to rsslEncodeElementEntryComplete, the encodeIterator and a boolean value. So it appears that something is wrong with the encode iterator but I don't have a way to tell what the issue is. Is there a way to determine the source of the error here?

Thanks.

Best Answer

  • Hi @Bill Steinberg

    The content of element entry
    has a maximum encoded length of 65,535 bytes. This is a limitation in UPA and ETA as mentioned in developer guide.

    I believe your 8500+ items array exceeds the maximum length.

Answers

  • Thanks Warat B. Didn't realize there is a 64K limitation. Looks like I will need to parttition my batch request around this limit.