|
@@ -152,7 +152,7 @@ func (r *RuleChainActor) onTellNext(msg *protocol.Message, originatorNodeId stri
|
|
|
|
|
|
// push a message to target ctx
|
|
|
func (r *RuleChainActor) pushMsgToTarget(tpi *queue.TopicPartitionInfo, msg *protocol.Message, entityId entities.EntityId, fromRelationType string) {
|
|
|
- if tpi.MyPartition {
|
|
|
+ if !tpi.MyPartition {
|
|
|
switch entityId.GetEntityType() {
|
|
|
case entities.RULE_NODE:
|
|
|
targetCtx := r.nodeActors[entityId.GetId()]
|
|
@@ -185,6 +185,7 @@ func (r *RuleChainActor) putMessageToQueue(tpi *queue.TopicPartitionInfo, msg *p
|
|
|
if err != nil {
|
|
|
server.Log.Error(err)
|
|
|
}
|
|
|
+ fmt.Printf("%v", tpi)
|
|
|
r.clusterService.PushMessageToRuleEngine(tpi, msg.Id, msgBytes, queueCallback)
|
|
|
}
|
|
|
|
|
@@ -276,6 +277,7 @@ func (r *RuleChainActor) initRoutes(ruleChain *ruleEngine.RuleChain, nodes []*ru
|
|
|
}
|
|
|
r.nodeRoutes[node.RuleNodeId] = rs
|
|
|
}
|
|
|
+ fmt.Printf("%+v", r.nodeRoutes)
|
|
|
r.firstId = ruleChain.FirstNodeId
|
|
|
r.firstNode = r.nodeActors[r.firstId]
|
|
|
r.state = ruleEngine.ACTIVE
|
|
@@ -289,7 +291,7 @@ func (r *RuleChainActor) createNodeActor(nodeId string) (ruleEngine.Ref, error)
|
|
|
return r.Ctx.GetOrCreateChildActor(nodeId,
|
|
|
ruleEngine.RULE_DISPATCHER_NAME,
|
|
|
NewRuleNodeActorCreator(r.SystemCtx, r.tenantId,
|
|
|
- r.ruleChainId, r.ruleChainName, nodeId, r.Ctx))
|
|
|
+ r.ruleChainId, r.ruleChainName, nodeId, r.Ctx.GetParentRef()))
|
|
|
}
|
|
|
|
|
|
// RuleChainCreator
|