Http Inbound Gateway Problem
I've a SI project with the following composition:
Everything seem to be working perfectly, no error and the expected message is arriving to my last toString transformer and is sent to the final response channel. The weird thing is that the gateway sometimes doesn't return the message, I get a 200 OK but nothing in the payload despite I can see in log file and debugging that I'm sending to the final response channel the right information.
<int:chain input-channel="requestChannel" output-channel="messageSubscriber">
<int:transformer ref="requestTransformer" />
<int:header name="ad_correlation_id" expression="T(java.util.UUID).randomUUID().toString()" />
<int:publish-subscribe-channel id="messageSubscriber" task-executor="executor" />
<task:executor id="executor" pool-size="6" />
<int:chain input-channel="channelPreAggregation" output-channel="responseChannel">
<int:aggregator correlation-strategy-expression="headers.get('ad_correlation_id')" release-strategy-expression="size() == 2" />
<int:transformer ref="toStringlTransformer" />
This only happens sometimes (always in the first call when I start the server), the rest of the times everything works fine.
The problem seems to be in the task executor, because if I remove it, everything run ok, but I would like to call to the two services activator at the same time, not sequentially, so I need the task executor (or is there other possibility???).
Any idea?? Maybe a problem with threads??
Thanks in advance.