enqueue newly created messages
This commit is contained in:
parent
4457b5a11a
commit
bfb055cc6e
@ -188,7 +188,7 @@ class AlarmState {
|
|||||||
setAlarmConditionMetadata(ruleState, metaData);
|
setAlarmConditionMetadata(ruleState, metaData);
|
||||||
TbMsg newMsg = ctx.newMsg(lastMsgQueueName != null ? lastMsgQueueName : ServiceQueue.MAIN, "ALARM",
|
TbMsg newMsg = ctx.newMsg(lastMsgQueueName != null ? lastMsgQueueName : ServiceQueue.MAIN, "ALARM",
|
||||||
originator, msg != null ? msg.getCustomerId() : null, metaData, data);
|
originator, msg != null ? msg.getCustomerId() : null, metaData, data);
|
||||||
ctx.tellNext(newMsg, relationType);
|
ctx.enqueueForTellNext(newMsg, relationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setAlarmConditionMetadata(AlarmRuleState ruleState, TbMsgMetaData metaData) {
|
protected void setAlarmConditionMetadata(AlarmRuleState ruleState, TbMsgMetaData metaData) {
|
||||||
|
|||||||
@ -120,7 +120,7 @@ public class TbSendRPCRequestNode implements TbNode {
|
|||||||
ctx.enqueueForTellNext(next, TbRelationTypes.SUCCESS);
|
ctx.enqueueForTellNext(next, TbRelationTypes.SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
TbMsg next = ctx.newMsg(msg.getQueueName(), msg.getType(), msg.getOriginator(), msg.getCustomerId(), msg.getMetaData(), wrap("error", ruleEngineDeviceRpcResponse.getError().get().name()));
|
TbMsg next = ctx.newMsg(msg.getQueueName(), msg.getType(), msg.getOriginator(), msg.getCustomerId(), msg.getMetaData(), wrap("error", ruleEngineDeviceRpcResponse.getError().get().name()));
|
||||||
ctx.tellFailure(next, new RuntimeException(ruleEngineDeviceRpcResponse.getError().get().name()));
|
ctx.enqueueForTellFailure(next, ruleEngineDeviceRpcResponse.getError().get().name());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ctx.ack(msg);
|
ctx.ack(msg);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user