I'm trying to poll a DB on client side and send the result over HTTP to a server which collects data. Unfortunatly only the first message is delivered. I'm new to spring-integration (1.0.3)
What is wrong with my configuration?
Clients config:
<si:channel id="msgChannel">
<si:queue capacity="1" />
</si:channel>
<si:inbound-channel-adapter ref="jdbcInputAdapter" method="fetchData" channel="msgChannel">
<si:poller max-messages-per-poll="1">
<si:interval-trigger interval="5000" />
</si:poller>
</si:inbound-channel-adapter>
<http:outbound-gateway id="httpChannelAdapter" request-channel="msgChannel" default-url="http://localhost:8080/company/gateway"/>
<si:poller default="true">
<si:interval-trigger interval="5000" />
</si:poller>
Servers config:
<si:channel id="requestChannel">
<si:queue capacity="4" />
</si:channel>
<si:channel id="replyChannel" />
<http:inbound-gateway id="InboundGateway" request-channel="requestChannel" reply-channel="replyChannel"/>
<bean id="shouter" class="com.company.Shouter"/>
<si:outbound-channel-adapter ref="shouter" method="shout" channel="replyChannel"/>
<si:service-activator input-channel="requestChannel"
ref="StorageService" method="store"
output-channel="replyChannel" />
<bean id="StorageService" class="com.company.StorageService" />
<si:poller default="true">
<si:interval-trigger interval="1000" />
</si:poller>
EDIT: Everytime I restart the client a single message will be received by the server.
SOLVED: I had to change the signature of StorageService from
public void store(Message msg)
to
public Message store(Message msg)