Conversation
| @@ -0,0 +1,85 @@ | |||
| package org.apache.servicecomb.pack.alpha.fsm.channel.redis; | |||
There was a problem hiding this comment.
Please add the Apache License heard here
| this.sendTo(event); | ||
| metricsService.metrics().doEventAccepted(); | ||
| } catch (Exception ex) { | ||
| logger.error("send Exception = [{}]", ex); |
There was a problem hiding this comment.
log error can show the stack trace if the last object is exception, but I'm not sure if it works for your case.
There was a problem hiding this comment.
Which reminds me, here should throw an exception
| @@ -0,0 +1,7 @@ | |||
| package org.apache.servicecomb.pack.alpha.fsm.channel.redis; | |||
pom.xml
Outdated
| <netty.boringssl.version>2.0.7.Final</netty.boringssl.version> | ||
| <netty.version>4.1.24.Final</netty.version> | ||
| <zookeeper.version>3.4.13</zookeeper.version> | ||
| <fastjson.version>1.2.58</fastjson.version> |
There was a problem hiding this comment.
If we add new dependency, we need to update the license file here
WillemJiang
left a comment
There was a problem hiding this comment.
Please add the JIRA number in your commit log.
| @Override | ||
| public void sendTo(BaseEvent event){ | ||
| throw new UnsupportedOperationException("Doesn't implement yet!"); | ||
| LOG.info("sendTo message = [{}]",event); |
|
|
||
| @Override | ||
| public void publish(Object data) { | ||
| logger.info("send message [{}] to [{}]", data, channelTopic.getTopic()); |
There was a problem hiding this comment.
I suggest using
if(LOG.isDebugEnabled()){
LOG.debug(xxx)
}|
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 @Autowride
NodeStatus nodeStatus;
if(nodeStatus.isMaster()){
// Is master
} |
RedisMessageSubscriber
application.yaml
Follow this checklist to help us incorporate your contribution quickly and easily:
[SCB-XXX] Fixes bug in ApproximateQuantiles, where you replaceSCB-XXXwith the appropriate JIRA issue.mvn clean installto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.