Results 1 to 7 of 7

Thread: Resequencer requires the 'correlationKey' property

  1. #1

    Question 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. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    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?

  3. #3

    Default

    Quote 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.

  4. #4

    Default

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

  5. #5
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    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

  6. #6

    Default

    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 ?

  7. #7
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    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

Tags for this Thread

Posting Permissions

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