ShenFeng312 opened a new issue #288:
URL: https://github.com/apache/rocketmq-spring/issues/288
code:
```java
Class<?> targetClass;
if (rocketMQListener != null) {
targetClass =
AopProxyUtils.ultimateTargetClass(rocketMQListener);
} else {
targetClass =
AopProxyUtils.ultimateTargetClass(rocketMQReplyListener);
}
Type messageType = this.getMessageType();
Class clazz = null;
if (messageType instanceof ParameterizedType && messageConverter
instanceof SmartMessageConverter) {
clazz = (Class) ((ParameterizedType) messageType).getRawType();
} else if (messageType instanceof Class) {
clazz = (Class) messageType;
} else {
throw new RuntimeException("parameterType:" + messageType + " of
onMessage method is not supported");
}
try {
final Method method = targetClass.getMethod("onMessage", clazz);
return new MethodParameter(method, 0);
} catch (NoSuchMethodException e) {
e.printStackTrace();
throw new RuntimeException("parameterType:" + messageType + " of
onMessage method is not supported");
}
```
but
`RocketMQListener.class.isAssignableFrom(bean.getClass())`or`RocketMQReplyListener.class.isAssignableFrom(bean.getClass())`
had checked it before
----------------------------------------------------------------
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:
[email protected]