-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ClassCastException from PollSkipAdvice #2714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Fixes spring-projects#2714 Return null instead of false when poll skipped.
Thanks - strange that nobody reported this in 5 years - I guess people aren't using it (or are using a smart poller, which really superseded this functionality). |
It looks like a change in AbstractPollingEndpoint occurred about 4 months ago might have introduced this. If you don't mind, could you point me to the documentation for the smart polling you mentioned? I'm using this to only poll a database when the process has leadership. |
Ah - ok; thanks; yes, it's a regression. See "Smart" Polling.
|
Fixes #2714 Return null instead of false when poll skipped.
So, it looks like there's nothing out of the box to provide the functionality of PollSkipAdvice as a AbstractMessageSourceAdvice. It wouldn't take much to refactor the current class to do so, is this something that should/will be done in the future? |
Good point; yes, we should do that. |
Affects Version(s): 5.1.2
When using a PollSkipAdvice that is set to skipPolls, it causes a ClassCastException in AbstractPollingEndpoint. This is caused by the
return Boolean.FALSE;
on line 56 when the AbstractPollingEndpoint expects a Message or null.The text was updated successfully, but these errors were encountered: