0

I am fairly new to Spring integration, but learning so far.

I am getting messages from a channel named "Channel-1" and passing on to "Channel-2" through a bridge

<task:executor id="Channel2Executor" pool-size="${executor.pool.size}" rejection-policy="CALLER_RUNS" />

<int:channel id="Channel-2">
    <int:dispatcher task-executor="Channel2Executor"/>
</int:channel>

<int:bridge id="adapterParserBridge" input-channel="Channel-1" output-channel="Channel-2">
</int:bridge>

Strange thing is that when I deploy the application in JBoss, first time the message passes through and makes to end of my subsequent flow, though there are some errors in later part of flow.

Second time onwards the message reaches till "Channel-1", but never makes beyond - no errors, no logs, all on DEBUG mode, no trace of anything.

So my questions are:

1) Are the errors which are happening in later part of flow cause of such an issue?

2) How to debug such an drop of message for no reason and without any error?

3) Any other suggestions or pointers to drill through these channels would be great

Vishal Biyani
  • 4,297
  • 28
  • 55

1 Answers1

1
  1. No

  2. In debug mode, if you really are sending a message to Channel-1 you will see "preSend on channel 'Channel-1'... ", "postSend on channel 'Channel-1'... " etc.

  3. A common mistake is to have more than one subscriber on Channel-1; by default, RoundRobin distribution is used; so, the first message would be bridged to Channel-2, the second would go to the other subscriber, etc.

With debug logging, it is impossible to send a message to Channel-1 without seeing, at least, the "preSend" debug log.

21:09:24.825 DEBUG [someThread][org.springframework.integration.channel.DirectChannel] preSend on channel 'foo', message: [Payload=xxx][Headers={timestamp=1352167764822, id=14b8ae47-08d8-4bf6-94bf-e342eb705df4}]
Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • Thanks a lot Gary, you are spot on with the point (3) and was the issue in my case. Now most of messages are going through bridge and forward, except in some cases they are going to LoggingHandler#0, though I have not defined any LoggingHandler in my context - but that is something I need to investigate more! Thanks again – Vishal Biyani Nov 06 '12 at 06:28