-
casting pollable error
Hi ,
I am getting this error since in configuration i am using direct channel but while retrieving the value in the main file i am doing casting into pollable channel which is not correct ...
java.lang.ClassCastException: org.springframework.integration.channel.DirectChan nel cannot be cast to org.springframework.integration.core.PollableChann el
at com.apress.prospringintegration.test.main(test.jav a:67)
so can u provide me the alternative to directly retrieve the value of the direct channel, so that I can avoid this error...!!!
-
You don't "retrieve" messages from a DirectChannel, you subscribe to it and the message is delivered to you (it's a SubscribableChannel).
See http://static.springsource.org/sprin...ingle/#channel