cancel
Showing results for 
Search instead for 
Did you mean: 

Azure hotfolder and concurency

Hello Experts,

Probably at some point you would like to improve performance of hot folder by changing a 'azureChannelAdapterTaskExecutor' pool configuration. See some documentation at
https://help.sap.com/viewer/403d43bf9c564f5a985913d1fbfbf8d7/v2105/en-US/98ed326d302a4573afe71e0e58e...

But looks like Azure hotfolder integration not designed to work in concurrent environment and looks like you will only recognize it under heavy load. The main issue is how file processing starting from Azure hotfolder.
If you are on premise environment and have some mounted folder, for you fix probably will be something like a configuration of spring integration and usage of file locker:


At SAP Commerce Cloud everything is not so simple, but after long analyses probably you can find and easy solution how it can be fixed. Just want to share this simple solution with a community:

public class CustAzureBlobSynchronizingMessageSource extends AzureBlobSynchronizingMessageSource {

private final AtomicBoolean isSynchronizingFiles = new AtomicBoolean(false);

public CustAzureBlobSynchronizingMessageSource(final AzureBlobInboundSynchronizer synchronizer) {
super(synchronizer);
}

@Override
protected void synchronizeFiles() {
if (isSynchronizingFiles.compareAndSet(false, true)) {
try {
synchronized (this) {
super.synchronizeFiles();
}
} finally {
isSynchronizingFiles.set(false);
}
}
}

}

By the way in attached file you can find more complex and reliable fix, so the main idea is a same, but more complex solution avoids some set of issues that can happens.

customazureblobsynchronizingmessagesource.txt


Best Regards,
Vitalii

View Entire Topic
mansurarisoy
Contributor
0 Kudos

Hi vitalii.fedoryshyn.delaware,

That's great you shared your experience and resolution about the Azure hotfolders and concurrency. I suggest you to write this as a blog post. You may need to complete a tutorial first: https://developers.sap.com/tutorials/community-blogging.html

Regards,