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
In consumer client code ConsumeMessageConcurrentlyService, there is a scheduled executor used to clean the expired messages(consuming-blocked messages) in ProcessQueue.
When using scheduleAtFixedRate, once a thread throws an exception, it will not continue to execute the following threads. So the Runnable must be surrounded by try-catch.
Since the scheduleAtFixedRate without try-catch, the cleanExpireMsg thread may abnormally exit and never be executed again, which may cause the consuming-blocked message always stay in ProcessQueue, resulting in the consume offset get stuck. (We have actually met this problem in production environment.)
The text was updated successfully, but these errors were encountered:
In consumer client code
ConsumeMessageConcurrentlyService
, there is a scheduled executor used to clean the expired messages(consuming-blocked messages) inProcessQueue
.When using
scheduleAtFixedRate
, once a thread throws an exception, it will not continue to execute the following threads. So the Runnable must be surrounded by try-catch.Since the scheduleAtFixedRate without try-catch, the
cleanExpireMsg
thread may abnormally exit and never be executed again, which may cause the consuming-blocked message always stay inProcessQueue
, resulting in the consume offset get stuck. (We have actually met this problem in production environment.)The text was updated successfully, but these errors were encountered: