You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/07/25 07:57:18 UTC

[GitHub] [servicecomb-pack] coolbeevip edited a comment on issue #511: SCB-1374 support fsm redis channel

coolbeevip edited a comment on issue #511: SCB-1374 support fsm redis channel
URL: https://github.com/apache/servicecomb-pack/pull/511#issuecomment-514938553
 
 
   When Alpha cluster, only one RedisMessageSubscriber should be allowed at the same time. Otherwise, it will repeat consumption. 
   
   You can use the following method to determine whether the current node is the master node, Or you can implement a distributed lock based on Redis inside your component, only one Redis subscriber at a time
   
   ```java
   @Autowride
   NodeStatus nodeStatus;
   
   if(nodeStatus.isMaster()){
     // Is master
   }
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services