What's the significance of the last number in batch responses?

denis.cokanovic
denis.cokanovic Newcomer
edited August 26 in WebSocket API

I’m implementing batch requests using the WebSocket API and have a question about the status response.

The response text includes something like: Processed 3 total items from Batch Request. 3 Ok.

I understand that in this case, three streams would be created. However, if I intentionally include an invalid RIC in the batch, I still receive two refresh messages and one status message saying RIC NOT FOUND. Despite that, the status response still says Processed 3 total items from Batch Request. 3 Ok.

My question is:

  • What does the second number in 3 Ok. represent?
  • If it can differ from the first number (Processed 3), what would that difference indicate?

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @denis.cokanovic

    Thank you for reaching out to us.

    This is an expected behavior.

    A batch stream will be closed with the "Processed <n> total items from Batch Request.  <n> Ok." text. This means that the server got a batch request that contains <n> items properly.

    Then, each item will have its own stream. In this sample, a batch stream (#10) contains three items so the item streams will be #11, #12, and #13.

    image.png

    The stream #13 contains an invalid item so the stream was closed with the "***The record could not be found" text.