@ -190,13 +190,13 @@ class DefaultTbContext implements TbContext {
@Override
public void enqueueForTellNext ( TbMsg tbMsg , String queueName , String relationType , Runnable onSuccess , Consumer < Throwable > onFailure ) {
TopicPartitionInfo tpi = resolvePartition ( tbMsg , queueName ) ;
enqueueForTellNext ( tpi , tbMsg , Collections . singleton ( relationType ) , null , onSuccess , onFailure ) ;
enqueueForTellNext ( tpi , queueName , tbMsg , Collections . singleton ( relationType ) , null , onSuccess , onFailure ) ;
}
@Override
public void enqueueForTellNext ( TbMsg tbMsg , String queueName , Set < String > relationTypes , Runnable onSuccess , Consumer < Throwable > onFailure ) {
TopicPartitionInfo tpi = resolvePartition ( tbMsg , queueName ) ;
enqueueForTellNext ( tpi , tbMsg , relationTypes , null , onSuccess , onFailure ) ;
enqueueForTellNext ( tpi , queueName , tbMsg , relationTypes , null , onSuccess , onFailure ) ;
}
private TopicPartitionInfo resolvePartition ( TbMsg tbMsg , String queueName ) {
@ -211,9 +211,13 @@ class DefaultTbContext implements TbContext {
}
private void enqueueForTellNext ( TopicPartitionInfo tpi , TbMsg source , Set < String > relationTypes , String failureMessage , Runnable onSuccess , Consumer < Throwable > onFailure ) {
enqueueForTellNext ( tpi , source . getQueueName ( ) , source , relationTypes , failureMessage , onSuccess , onFailure ) ;
}
private void enqueueForTellNext ( TopicPartitionInfo tpi , String queueName , TbMsg source , Set < String > relationTypes , String failureMessage , Runnable onSuccess , Consumer < Throwable > onFailure ) {
RuleChainId ruleChainId = nodeCtx . getSelf ( ) . getRuleChainId ( ) ;
RuleNodeId ruleNodeId = nodeCtx . getSelf ( ) . getId ( ) ;
TbMsg tbMsg = TbMsg . newMsg ( source , ruleChainId , ruleNodeId ) ;
TbMsg tbMsg = TbMsg . newMsg ( source , queueName , ruleChainId , ruleNodeId ) ;
TransportProtos . ToRuleEngineMsg . Builder msg = TransportProtos . ToRuleEngineMsg . newBuilder ( )
. setTenantIdMSB ( getTenantId ( ) . getId ( ) . getMostSignificantBits ( ) )
. setTenantIdLSB ( getTenantId ( ) . getId ( ) . getLeastSignificantBits ( ) )