-1

I have a large soap xml file with at least 10000+ transactions, that is stored in an azure blob. I am reading the xml content from azure and have to send individual transaction to the server for processing.

How can I manage the records that are read already in case when my client abruptly shutdowns. I don't want to read all the messages from the blob again.

Is there a way to manage the indexing and resume back from the same point where I left during the exception ??

srikant_mantha
  • 109
  • 1
  • 13

1 Answers1

0

As I known, the answer is no that there is not any function to count the bytes of having read for downloading a blob. However, you can try to realize it to count the reading byte size as indexing for resuming back.

And, the BlobRange class used in the function download(BlobRange range, BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Context context) can help you to skip the content of having read to offset the previous index to continuous to read via its method withOffset(long offset).

long offset = ...; // the indexing 
BlobRange blobRange = new BlobRange();
blobRange.withOffset(offset);

Hope it helps.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43