Announcement Announcement Module
Collapse
No announcement yet.
Resequencer requires the 'correlationKey' property Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resequencer requires the 'correlationKey' property

    I am trying to use Resequencer

    Reference

    http://static.springsource.org/sprin...ml#resequencer


    <channel id="inputChannel"/>

    <channel id="outputChannel">
    <queue capacity="20" />
    </channel>

    <resequencer output-channel="outputChannel" input-channel="inputChannel"/>


    While implementing I am getting below exception.


    org.springframework.integration.message.MessageHan dlingException: Resequencer requires the 'correlationKey' property

  • #2
    The resequencer does have a default "correlationKey" (which is actually the correlationId header), but that requires that some upstream component to have populated that value. Do you have any publish/subscribe channel or splitter components upstream?

    Comment


    • #3
      Originally posted by Mark Fisher View Post
      The resequencer does have a default "correlationKey" (which is actually the correlationId header), but that requires that some upstream component to have populated that value. Do you have any publish/subscribe channel or splitter components upstream?


      No I don't. I think even Aggregator needs to have any publish/subscribe channel or splitter components upstream right ?

      Also Could you give a link for a sample example of publish subscriber example.

      Comment


      • #4
        Forgot to ask you, Can we Set the correlationId header value during creation of a message?

        Comment


        • #5
          Yes, you can set the correlationId header yourself (e.g. using <header-enricher> or a @Header method on a Gateway interface) or you can set a correlation-strategy on the resequencer.

          The Loan Broker and Cafe samples both show split/aggregate flows. They use a router and splitter respectively, but the same applies for a publish-subscribe-channel (as long as the 'apply-sequence' attribute is set to TRUE).

          Hope that helps.
          -Mark

          Comment


          • #6
            is there any link to download the source code for Loan broker?
            Mark If for the above problem (resequencer) can I have router or filter as upstream component & are they capable for setting/populate the correlationId ?

            Comment


            • #7
              The samples are available in the source control repository. You can find all links at the homepage: http://springsource.org/spring-integration

              In 1.0, the 'router' does not have an 'apply-sequence' flag. That was added in 2.0. I don't see how it would make sense on a 'filter' component?

              By the way, if you are interested in 2.0, we have moved and extended the samples. This blog provides all the details: http://blog.springsource.com/2010/09...ration-samples

              Comment

              Working...
              X