-
Notifications
You must be signed in to change notification settings - Fork 198
job monitoring
Easy Batch allows you to monitor job execution and progress at runtime using JMX. The JMX MBean named org.jeasy.batch.jmx.monitor:name=YourJobName
exposes the following attributes:
- The job start and end times
- The job status
- The number of read records
- The number of written records
- The number of filtered records
- The number of errors
In order to register this JMX MBean, you should enable JMX monitoring at application startup:
Job job = new JobBuilder()
.enableJmx(true)
.build();
You can then use any standard JMX compliant tool such as VisualVM to visualize monitoring attributes. The screenshot below shows an example of job monitoring using VisualVM:
JMX monitoring is disabled by default.
NB: You must ensure that JMX-enabled jobs have a unique name. Otherwise, notifications will be mixed or lost.
When you enable JMX monitoring, the job monitor will automatically send notifications about execution progress. In order to listen to these notifications, you need to:
- Specify the JMX port on which the job monitor should send notifications. This can be done using the
com.sun.management.jmxremote.port
JVM parameter - Use a
JobMonitorProxy
with aJobMonitoringListener
to handle notifications
You can find an example of how to use these APIs in the JMX tutorial.
Easy Batch is created by Mahmoud Ben Hassine with the help of some awesome contributors
-
Introduction
-
User guide
-
Job reference
-
Component reference
-
Get involved