You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problems:
When definition the listener like this. the starter cannot settup public class Listener1 implements RocketMQListener<MsgDto<String>>
Recently, I tryied solve this problem,only modify the DefaultRocketMQListenerContainer class. Wish to improve the starter in next release.
My Main idea is use org.springframework.messaging.converter.SmartMessageConverter#fromMessage .This interface define a third parameter called "Object conversionHint".
I switch the Definition of DefaultRocketMQListenerContainer#messageType to Type insteadof Class
add a "private MethodParameter onMessageParameter" member to DefaultRocketMQListenerContainer and init it to indicate the onMessage parameter when afterPropertiesSet()
when doCovertMessage. if the messageType instanceof ParameterizedType, then call fromMessage with the third parameter(methodParameter). The MappingJackson2MessageConverter can use it to deserialization the message.
The text was updated successfully, but these errors were encountered:
Problems:
When definition the listener like this. the starter cannot settup
public class Listener1 implements RocketMQListener<MsgDto<String>>
Recently, I tryied solve this problem,only modify the DefaultRocketMQListenerContainer class. Wish to improve the starter in next release.
The text was updated successfully, but these errors were encountered: