ChangingFond opened a new issue, #101:
URL: https://github.com/apache/rocketmq-mqtt/issues/101

   [PR 79](https://github.com/apache/rocketmq-mqtt/pull/79) defined a 
subscription storage interface, but there is no default implementation, then 
SpringUtils.getBean(SubscriptionPersistManager.class) will throw a 
NoSuchBeanDefinitionException, which is a runtime exception, client's 
subscribe/unsubscribe operations will be failed. 
   
   Solution: Catch BeansException in SpringUtils class and return null, to not 
block normal logic.
   
   
![image](https://user-images.githubusercontent.com/10083870/169540970-360c4c72-4773-40ed-a223-507c44763475.png)
   
   
   ```
   2022-05-20 21:40:21:072 [AuthHook_2] ERROR [AbstractUpstreamHook] 
   org.springframework.beans.factory.NoSuchBeanDefinitionException: No 
qualifying bean of type 
'org.apache.rocketmq.mqtt.common.facade.SubscriptionPersistManager' available
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:353)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:340)
        at 
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1092)
        at 
org.apache.rocketmq.mqtt.common.util.SpringUtils.getBean(SpringUtils.java:35)
        at 
org.apache.rocketmq.mqtt.ds.upstream.processor.SubscribeProcessor.process(SubscribeProcessor.java:65)
        at 
org.apache.rocketmq.mqtt.ds.upstream.UpstreamProcessorManager.processMqttMessage(UpstreamProcessorManager.java:74)
        at 
org.apache.rocketmq.mqtt.common.hook.AbstractUpstreamHook.doHook(AbstractUpstreamHook.java:44)
        at 
org.apache.rocketmq.mqtt.common.hook.AbstractUpstreamHook.lambda$doHook$0(AbstractUpstreamHook.java:54)
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to