You need to autowire using the interface instead of the concrete class because the JMX export wraps the channel in a proxy. Use PollableChannel
for QueueChannel
, or SubscribableChannel
for DirectChannel
.
It's always good practice to code using interfaces rather than concrete classes, for exactly this reason.