I want to read Message from a RabbitMQ Queue > Use Service-Activator to invoke a Service.
But following exception:
...
Caused by: java.lang.IllegalArgumentException: Target object of type [class org.springframework.integration.service.MessageExa miner] has no eligible methods for handling Messages.
The relevant config section is:
The MsgService Class is:Code:<int-amqp:inbound-channel-adapter channel="fromRabbit" queue-names="si.test.queue" mapped-request-headers="whatever" connection-factory="connectionFactory" /> <int:service-activator input-channel="fromRabbit" output-channel="whatever" ref="msgService" method="checkMsg1"/> <bean id="msgService" class="com.whatever.MsgService"/>
Any ideas?Code:public class MsgService{ //Does not work! public void checkMsg1( @Payload String s) { System.out.println("The Payload is: " +s); } //Does not work! public void checkMsg2( Message inboundMessage) { //... }


Reply With Quote
