序言
rocket mq 一共16 个模块。如下:
| 划分 | 模块名 | 是否有异常体系 |
|---|---|---|
| 通用模块 | remoting | 有 |
| 通用模块 | common | |
| 通用模块 | srvutil | |
| 中坚模块 | store | |
| 中坚模块 | acl | 有 |
| 中坚模块 | filter | |
| 上层模块 | client | 有 |
| 上层模块 | namesrv | |
| 上层模块 | broker | |
| 协议适配模块 | openmessageing | |
| 协议适配模块 | logappender | |
| 协议适配模块 | logging | |
| 其余模块 | tool | |
| 其余模块 | test | |
| 其余模块 | example | |
| 其余模块 | distribution |
一、中间件
1. rocketmq
| 模块 | 异常 | runtime | 含义 | 何时抛出? | 如何处理? |
|---|---|---|---|---|---|
| remoting | RemotingException | N | |||
| remoting | RemotingCommandException | N | |||
| remoting | RemotingConnectException | N | |||
| remoting | RemotingSendRequestException | N | |||
| remoting | RemotingTimeoutException | N | |||
| remoting | RemotingTooMuchRequestException | N | |||
| acl | AclException | Y | |||
| client | MQBrokerException | N | null | null | null |
| client | MQClientException | N | null | null | null |
| client | RequestTimeoutException | N | null | null | null |
2. hsf (待补充)
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? | |
|---|---|---|---|---|---|
| GenericException | Y | null | null | null | |
| ParseException | N | null | null | null | |
| RpcException | Y | null | null | null | |
| BurlapProtocolException | N | null | null | null | |
| BurlapProtocolException | N | null | null | null | |
| BurlapRuntimeException | Y | null | null | null | |
| BurlapServiceException | N | null | null | null | |
| BurlapServiceException | N | null | null | null | |
| ExecutionException | N | null | null | null | |
| FlowControlRuleParseException | N | null | null | null | |
| GenericInvocationException | Y | null | null | null | |
| GroupingRuleParseException | N | null | null | null | |
| HSFException | N | null | null | null | |
| HSFSerializeException | N | null | null | null | |
| HSFServiceAddressNotFoundException | N | null | null | null | |
| HSFTimeOutException | N | null | null | null | |
| HessianConnectionException | Y | null | null | null | |
| HessianException | Y | null | null | null | |
| HessianFieldException | N | null | null | null | |
| HessianMethodSerializationException | Y | null | null | null | |
| HessianProtocolException | N | null | null | null | |
| HessianRuntimeException | Y | null | null | null | |
| HessianServiceException | N | null | null | null | |
| IOExceptionWrapper | N | null | null | null | |
| MessageServiceException | N | null | null | null | |
| NameServiceException | N | null | null | null | |
| NoSuchMethodException | Y | null | null | null | |
| NoSuchPropertyException | Y | null | null | null | |
| RemotingException | N | null | null | null | |
| RouteRuleParserException | N | null | null | null | |
| RpcException | Y | null | null | null | |
| RuleParseException | N | null | null | null | |
| TPSRuleParseException | N | null | null | null | |
| TimeoutException | N | null | null | null | |
| remoting | RemotingCheckedException | N | null | null | null |
| remoting | RemotingUncheckedException | Y | null | null | null |
| common | NoSuchMethodException | Y | null | null | null |
| common | NoSuchPropertyException | Y | null | null | null |
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? | |
|---|---|---|---|---|---|
| service | GenericException | Y | null | null | null |
3. cco-infra (全部 unchecked)
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|
| AcquireLockFailException | Y | 分布式锁获取失败 | null | null |
| BaseException | Y | null | null | null |
| CacheException | Y | tair 异常 | null | null |
| CryptException | Y | 加解密异常 | null | null |
| CustomResolverCanNotRunException | Y | hsf 单元路由参数解析器不存在异常 | null | null |
| QueueException | Y | metaq 异常 | null | null |
| RouteException | Y | 单元路由异常 | null | null |
| RpcException | Y | hsf 异常 | null | null |
| RpcGenericInvocationException | Y | hsf 泛化调用异常 | null | null |
| RpcServiceAddressNotFoundException | Y | hsf 服务找不到异常 | null | null |
| RpcTimeOutException | Y | rpc 超时异常 | null | null |
| SchedulerException | Y | 任务调度异常 | null | null |
| SequenceException | Y | sequence 异常 | null | null |
| SwitchException | Y | switch 异常 | null | null |
| UnexpectedException | Y | 不可预期的系统异常, 通常业务不知道如何处理, 不可私自catch, 需要抛到顶层去重试或者干预 常见的有: 网络错误, 中间件(数据库, 缓存)出错, 系统bug | null | null |
tddl
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|
| DataSourceClosedException | N | null | null | null |
| DataSourceDisableException | N | null | null | null |
| DataSourceNotAvailableException | N | null | null | null |
| GetConnectionTimeoutException | N | null | null | null |
| WallSQLException | N | null | null | null |
| 模块 | 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|---|
| executor | ExecutorException | Y | null | null | null |
| executor | FunctionException | Y | null | null | null |
| executor | JsonExecutionException | Y | null | null | null |
| executor | JsonParserException | Y | null | null | null |
| executor | LockConflictException | Y | null | null | null |
| executor | LockException | Y | null | null | null |
| executor | LockNeedRetryException | Y | null | null | null |
| executor | LockTimeoutException | Y | null | null | null |
| executor | UnsupportedJsonSyntaxException | Y | null | null | null |
| memcached | TddlMemcachedGroupKvNotEnableException | Y | null | null | null |
| memcached | TddlMemcachedQueryAccumulateTooManyException | Y | null | null | null |
| memcached | TddlMemcachedQueryCancledException | Y | null | null | null |
| memcached | TddlMemcachedQueryTimeoutException | Y | null | null | null |
| memcached | TddlMemcachedResultReceiveTooLargeException | Y | null | null | null |
| memcached | TddlMemcachedResultReceiveTooSlowException | Y | null | null | null |
| memcached | TddlMemcachedWaitingForServerInitException | Y | null | null | null |
| plugin-sdk | AlreadyCalledException | Y | null | null | null |
| plugin-sdk | DescriptorValidationException | N | null | null | null |
| plugin-sdk | GetDiamondCSConfigException | Y | null | null | null |
| plugin-sdk | InvalidEscapeSequenceException | N | null | null | null |
| plugin-sdk | InvalidProtocolBufferException | N | null | null | null |
| plugin-sdk | KryoException | Y | null | null | null |
| plugin-sdk | ObjenesisException | Y | null | null | null |
| plugin-sdk | OutOfSpaceException | N | null | null | null |
| plugin-sdk | ParseException | N | null | null | null |
| plugin-sdk | ParseException | N | null | null | null |
| plugin-sdk | ServiceException | N | null | null | null |
| plugin-sdk | TairAsyncDecodeError | N | null | null | null |
| plugin-sdk | TairAyncInvokeTimeout | N | null | null | null |
| plugin-sdk | TairClientException | N | null | null | null |
| plugin-sdk | TairIllegalArgumentException | Y | null | null | null |
| plugin-sdk | TairMultiClusterConfigException | Y | null | null | null |
| plugin-sdk | TairOverflow | N | null | null | null |
| plugin-sdk | TairServersHadDownException | Y | null | null | null |
| plugin-sdk | TairTimeoutException | N | null | null | null |
| plugin-sdk | UninitializedMessageException | Y | null | null | null |
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? | |
|---|---|---|---|---|---|
| client | ConvertorException | Y | null | null | null |
| CorruptEncodingException | Y | null | null | null | |
| EmptyResultFilterException | Y | null | null | null | |
| ExtensionNotFoundException | Y | null | null | null | |
| KvQueryException | Y | null | null | null | |
| NotSupportException | Y | null | null | null | |
| OptimizerException | Y | null | null | null | |
| PrivilegeException | Y | null | null | null | |
| SequenceException | Y | null | null | null | |
| SqlMonitorBreakException | Y | null | null | null | |
| SqlMonitorThrowException | Y | null | null | null | |
| SqlParserException | Y | null | null | null | |
| TableNotFoundException | Y | null | null | null | |
| TddlException | N | null | null | null | |
| TddlMemcachedException | N | null | null | null | |
| TddlMemcachedMetaException | Y | null | null | null | |
| TddlMemcachedMetaUnmatchedException | Y | null | null | null | |
| TddlMemcachedMetaVersionInvalidException | Y | null | null | null | |
| TddlMemcachedMissMetaException | Y | null | null | null | |
| TddlMemcachedRuntimeException | Y | null | null | null | |
| TddlMemcachedServerNotExistsException | Y | null | null | null | |
| TddlMemcachedServerNotReadyException | Y | null | null | null | |
| TddlMemcachedSesssionException | Y | null | null | null | |
| TddlMemcachedTypeCastException | Y | null | null | null | |
| TddlMemcachedTypeNotSupportException | Y | null | null | null | |
| TddlNestableRuntimeException | Y | null | null | null | |
| TddlRuntimeException | Y | null | null | null | |
| TruncatedDoubleValueOverflowException | Y | null | null | null |
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? | |
|---|---|---|---|---|---|
| atom | AtomNotAvailableException | N | null | null | null |
| group | GroupNotAvailableException | N | null | null | null |
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? | |
|---|---|---|---|---|---|
| monitor | StressTestInvalidException | N | null | null | null |
| monitor | UnitDeployInvalidException | N | null | null | null |
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? | |
|---|---|---|---|---|---|
| rule | EnumerationFailedException | Y | null | null | null |
| rule | EnumerationInterruptException | Y | null | null | null |
| rule | RouteCompareDiffException | N | null | null | null |
| rule | TddlRuleException | Y | null | null | null |
eagleeye
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|
| IllegalContextException | Y | null | null | null |
| ASMException | Y | null | null | null |
| FastException | Y | null | null | null |
| JSONException | Y | null | null | null |
四、guava
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|
| com.google.common.util.concurrent.AbstractFuture$Failure$1 | N | null | null | null |
| ComputationException | Y | null | null | null |
| DecodingException | N | null | null | null |
| EmptyServiceManagerWarning | N | null | null | null |
| ExampleStackTrace | Y | null | null | null |
| ExecutionError | N | null | null | null |
| FailedService | N | null | null | null |
| IncomparableValueException | Y | null | null | null |
| InsecureRecursiveDeleteException | N | null | null | null |
| InvalidCacheLoadException | Y | null | null | null |
| PotentialDeadlockException | Y | null | null | null |
| TimeoutFutureException | N | null | null | null |
| UncheckedExecutionException | Y | null | null | null |
| UncheckedTimeoutException | Y | null | null | null |
| UnsupportedLoadingOperationException | Y | null | null | null |
| VerifyException | Y | null | null | null |
六、fastjson
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|
| JSONException | Y | null | null | null |
| JSONPathException | Y | null | null | null |
七、eventbus
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|
| EventBusConsumerException | N | null | null | null |
| EventBusException | N | null | null | null |
| EventBusInitException | N | null | null | null |
八、druid
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|
| DruidRuntimeException | Y | null | null | null |
| EOFParserException | Y | null | null | null |
| MockConnectionClosedException | N | null | null | null |
| NotAllowCommentException | Y | null | null | null |
| OptionParseException | N | null | null | null |
| ParserException | Y | null | null | null |
| SQLParseException | Y | null | null | null |
| TransactionTimeoutException | N | null | null | null |
sentinel
| 异常 | runtime | 含义 | 何时抛出? | 何时处理? |
|---|---|---|---|---|
| AuthorityException | N | null | null | null |
| BlockException | N | null | null | null |
| ContextNameDefineException | Y | null | null | null |
| DegradeException | N | null | null | null |
| ErrorEntryFreeException | Y | null | null | null |
| FlowException | N | null | null | null |
| PriorityWaitException | Y | null | null | null |
| SentinelRpcException | Y | null | null | null |
| SystemBlockException | N | null | null | null |
问题
- 异常和 errorcode 的对应关系?
