Results 1 to 6 of 6

Thread: CorrelatingMessageHandler and Resequencer

  1. #1
    Join Date
    May 2011
    Location
    Cracow, Poland
    Posts
    53

    Default 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. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    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)

  3. #3
    Join Date
    May 2011
    Location
    Cracow, Poland
    Posts
    53

    Default

    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" />

  4. #4
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

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

  5. #5
    Join Date
    May 2011
    Location
    Cracow, Poland
    Posts
    53

    Default

    They are sent...

  6. #6
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •