Package com.github.workerframework.api
Interface DivertedTaskHandler
public interface DivertedTaskHandler
A worker should implement this interface if it is capable of evaluating task messages that have been diverted (maybe because the
worker's input queue is different from the target/to queue in the task message), and deciding what to do with them.
-
Method Summary
Modifier and TypeMethodDescriptionhandleDivertedTask
(TaskMessage tm, TaskInformation taskInformation, Map<String, Object> headers, Codec codec, JobStatus jobStatus, WorkerCallback callback) Examines the task message and decides what to do with it.
-
Method Details
-
handleDivertedTask
DivertedTaskAction handleDivertedTask(TaskMessage tm, TaskInformation taskInformation, Map<String, Object> headers, Codec codec, JobStatus jobStatus, WorkerCallback callback) Examines the task message and decides what to do with it.- Parameters:
tm
- the task messagetaskInformation
- the reference to the message this task arrived onheaders
- the map of key/value paired headers to be stamped on the messagecodec
- the Codec that can be used to serialise/deserialise datajobStatus
- the job status as returned by the status check URLcallback
- worker callback to enact the diverted action determined by the worker- Returns:
- the diverted task action to be taken by the worker
-