Subscribe to Task Status
Receive task status change notifications through RocketMQ.
Subscription Information
Section titled “Subscription Information”- Name: Task status notification
- Description: Subscribe to RocketMQ messages to receive task-status updates.
- Topic:
httpRemote - Tag:
uploadHttpRemoteTaskStatus - Login required: No
- Permission required: Yes
Note: Remote publishing must be enabled. In System Management > Parameter Settings, set
http_three_part_remote_upload to true.
Message Body
Section titled “Message Body”| Field / Type | Description and Example |
|---|---|
taskExecuteCodeString | Task execution identifier; see the field examples below. |
taskCodeString | Task-template code Example: 1989299475652878336 |
taskNameString | Task name; see the field examples below. |
statusString | Task status: 1 completed, 2 in progress, 3 paused, 4 terminated, 5 not executed, 6 overdueExample: 2 |
planStartTimeString | Planned start time (yyyy-MM-dd HH:mm:ss)Example: 2026-01-31 16:05:55 |
startTimeString | Actual start time (yyyy-MM-dd HH:mm:ss)Example: 2026-01-31 16:06:23 |
taskProgressString | Task progress Example: 100% |
remainTimeString | Estimated time remaining |
descriptionString | Description |
Field Examples
Section titled “Field Examples”taskExecuteCode
ysc001_1989299475652878336_20251115153307_yiibtaskName
Full inspection 1114-(20251115153307)Message Example
Section titled “Message Example”{ "taskExecuteCode": "ysc001_2017509386119794688_20260131160554_ov1r", "taskCode": "2017509386119794688", "taskName": "zz0131-(20260131160554)", "status": "2", "planStartTime": "2026-01-31 16:05:55", "startTime": "2026-01-31 16:06:23", "taskProgress": "0.00", "remainTime": null, "description": null}Subscription example:
@Slf4j@Component@RocketMQMessageListener( consumerGroup = "http_remote_group", topic = ConstRocketMQ.TOPIC_HTTP_REMOTE, selectorType = SelectorType.TAG, consumeMode = ConsumeMode.CONCURRENTLY, maxReconsumeTimes = 2// Recommended: maximum delivery attempts after a failure)public class HttpMessageConsumerTest implements RocketMQListener<MessageExt> { @Override public void onMessage(MessageExt message) { String msgId = message.getMsgId(); String keys = message.getKeys(); Map<String, String> properties = message.getProperties(); String tags = properties.get("TAGS"); String respMessageId = message.getProperty("respMessageId"); log.info("Processing message. msgId: {}, tags: {}, respMessageId: {}, keys: {}", msgId, tags, respMessageId, keys); String res = new String(message.getBody(), StandardCharsets.UTF_8); log.info("Raw message body: {}", res); }}