Announcement Announcement Module
Collapse
No announcement yet.
CorrelatingMessageHandler and Resequencer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • CorrelatingMessageHandler and Resequencer

    Hi!

    I am having resequencer component connected to 'recipient-list-router' using direct channel. In my resequencer component I am having custom release strategy implementation of the interface:
    Code:
    'org.springframework.integration.aggregator.ReleaseStrategy'
    Basing on some kind of business logic, data that are pushed into resequnecer, are being spooled (when the gap in sequence numbers was detected) or simply pushed into next component. In case when the gap is detected, method
    Code:
    public boolean canRelease(MessageGroup group)
    returns false and my data are buffered. In another case it returns true and data is flushed.

    My case is:
    When my resequencer component is directly connected (using direct channel) with a filter component, everything is fine. In the code of 'CorrelatingMessageHandler' i can see (line 186), that
    Code:
    group.isComplete()
    is returning false

    ...but when the resequencer is connected to 'recipient-list-router' component this method returns true and in spite of that my data is not spooled...

    Why is that?
    Please help.

  • #2
    I don't understand what you mean when you say re-sequencer is connected to recipient-list-router. Those are both endpoints and can not be connected directly, only through channel.
    Could you share your configuration? (working and not working)

    Comment


    • #3
      Not working:
      Code:
      	<int:recipient-list-router id="packetTypeRouter"
      		input-channel="packetFilteredChannel" apply-sequence="true">
      		<int:recipient channel="seqResetChannel"
      			selector-expression="payload.header.packetType == 1" />
      		<int:recipient channel="heartbeatChannel"
      			selector-expression="payload.header.packetType == 2" />
      		<int:recipient channel="recipientChannel"
      			selector-expression="payload.header.packetType > 30" />
      	</int:recipient-list-router>
      	<int:channel id="recipientChannel" />
      	
      	<int:resequencer id="seqNumberResequencer" comparator="messageComparator"
      		input-channel="recipientChannel" output-channel="sequencedChannel"
      		release-strategy="sequenceReleaseStrategy" />
      	<int:channel id="sequencedChannel" />
      Working:
      Code:
      	<int:filter input-channel="headerTransformedChannel"
      		discard-channel="packetTypeErrorChannel" output-channel="packetFilteredChannel"
      		ref="packetTypeFilter" />
      	<int:channel id="packetFilteredChannel" />
      
      	<int:resequencer id="seqNumberResequencer" comparator="messageComparator"
      		input-channel="packetFilteredChannel" output-channel="sequencedChannel"
      		release-strategy="sequenceReleaseStrategy" />
      	<int:channel id="sequencedChannel" />

      Comment


      • #4
        Could you please put a wire-tap on 'recipientChannel' and see if messages are even sent there in the case of the RLR?

        Comment


        • #5
          They are sent...

          Comment


          • #6
            May be you can attach a test case that reproduces this behavior?

            Comment

            Working...
            X