9/5/2023 0 Comments Spring batch scheduler![]() ![]() There are two methods beforeJob() and afterJob() and as the name suggests it gives us the liberty to do anything we want to before the execution of a job start and after the execution of the job ends. JobExecutionListener provides interceptions and life-cycle methods for spring batch Jobs. Take an example of a Trading Application, who wants to keep a track of the trade’s life-cycle and its moment between different stages of the trade’s life-cycle like booking, allocation, clearing, and take some actions on it.We can decide that before processing the trade of “Infosys” for quantities over 5000, we have to send the trader an email saying that we have received a big order. Spring Batch provides some very useful listeners and we can use them to control the flow of the batch processing and take important actions on a particular value at a certain point of the execution.We will see some samples and eventually see the execution of these various listeners. Spring Batch listeners are a way of intercepting the execution of a Job or a Step to perform some meaningful operations or logging the progress. We will see listeners intercept jobs and steps. ![]() But thought to be worthy mention.In this article, we will take a deep dive into different types of Spring Batch Listeners and how to configure and use them along with Spring Batch Job. Azure Batch: Well, it might be bit impractical for you since would need almost a rewrite.For only a single application, it might be overkill and costly. Deploy to AKS or Service Fabric: Consider this option only if you are planning a bigger migration to Azure for multiple existing applications/services and is inline with your overall cloud migration strategy.This action can be scheduled using a recurrence trigger in Logic App. For details on the connector, refer this. Use Logic App ACI connector to start your container group when needed and then stop once done. Deploy your container in Azure Container Instances. Azure Container Instance with Logic App trigger: Here, 1.NOTE: Custom container is not supported in Function Consumption plan. Refer Create a function on Linux using a custom container. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |