Good day. I use com.azure:azure-storage-blob
dependency with Java 8. And I have a question about the performance of the program. To get all blobs:
BlobServiceClient client = new BlobServiceClientBuilder()
.connectionString("connectionString")
.buildClient();
client.getBlobContainerClient("containerName")
.listBlobs(new ListBlobsOptions().setPrefix("prefix"), null)
.stream()...
The snippet works well, but if I need to set a time limit instead of null
, then error starts to appear:
Exception in thread "main" reactor.core.Exceptions$ReactiveException: java.util.concurrent.TimeoutException: Did not observe any item or terminal signal within 1000ms in 'flatMap' (and no fallback has been configured)
The bottom line is that I need to read groups of objects and send them for further processing without waiting for all. Because the waiting time of 10 objects will definitely be less than 10000. I know there is continuationToken
, but calling it on the returned collection will throw the exception mentioned above. Is there any optimal solution? Thanks in advance