Error Handler Strategy

Log Strategy

Type: LOG

Built-in: Yes

Log error and do not interrupt job.

Throw Strategy

Type: THROW

Built-in: Yes

Throw system exception and interrupt job.

Ignore Strategy

Type: IGNORE

Built-in: Yes

Ignore exception and do not interrupt job.

Email Notification Strategy

Type: EMAIL

Built-in: No

Send email message notification and do not interrupt job.

Maven POM:

  1. <dependency>
  2. <groupId>org.apache.shardingsphere.elasticjob</groupId>
  3. <artifactId>elasticjob-error-handler-email</artifactId>
  4. <version>${latest.release.version}</version>
  5. </dependency>

Configuration:

NameDescriptionRequiredDefault Value
email.hostEmail server host addressYes-
email.portEmail server portYes-
email.usernameEmail server usernameYes-
email.passwordEmail server passwordYes-
email.useSslWhether to enable SSL encrypted transmissionNotrue
email.subjectEmail SubjectNoElasticJob error message
email.fromSender email addressYes-
email.toRecipient’s email addressYes-
email.ccCarbon copy email addressNonull
email.bccBlind carbon copy email addressNonull
email.debugWhether to enable debug modeNofalse

Wechat Enterprise Notification Strategy

Type: WECHAT

Built-in: No

Send wechat message notification and do not interrupt job

Maven POM:

  1. <dependency>
  2. <groupId>org.apache.shardingsphere.elasticjob</groupId>
  3. <artifactId>elasticjob-error-handler-wechat</artifactId>
  4. <version>${latest.release.version}</version>
  5. </dependency>

Configuration:

NameDescriptionRequiredDefault Value
wechat.webhookThe webhook address of the wechat robotYes-
wechat.connectTimeoutMillisecondsThe timeout period for establishing a connection with the wechat serverNo3000 milliseconds
wechat.readTimeoutMillisecondsThe timeout period for reading available resources from the wechat serverNo5000 milliseconds

Dingtalk Notification Strategy

Type: DINGTALK

Built-in: No

Send dingtalk message notification and do not interrupt job

Maven POM:

  1. <dependency>
  2. <groupId>org.apache.shardingsphere.elasticjob</groupId>
  3. <artifactId>elasticjob-error-handler-dingtalk</artifactId>
  4. <version>${latest.release.version}</version>
  5. </dependency>

Configuration:

NameDescriptionRequiredDefault Value
dingtalk.webhookThe webhook address of the dingtalk robotYes-
dingtalk.keywordCustom keywordsNonull
dingtalk.secretSecret for dingtalk robotNonull
dingtalk.connectTimeoutMillisecondsThe timeout period for establishing a connection with the dingtalk serverNo3000 milliseconds
dingtalk.readTimeoutMillisecondsThe timeout period for reading available resources from the dingtalk serverNo5000 milliseconds