I came across this error while trying to use a Quartz scheduler with a JPA component but I guess it applies to all the endpoints extending ScheduledPollEndpoint.
If I use
I receive the following error:
This happens because the scheduler is an instance of DefaultScheduledPollConsumerScheduler. After some debugging I found out that when ScheduledPollEndpoint#configureScheduledPollConsumerProperties is called, schedulerName is always null (Endpoint.configureProperties is invoked before setting endpoint properties using reflection).
The only workaround I've found so far is to write a custom component and force the scheduler on the endpoint: