Results 1 to 7 of 7

Thread: Not possible to run parallell agregators

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    11

    Default Not possible to run parallell agregators

    Hi!

    I want to run multiple aggregators in parallell, so I set the Concurrence annotation on my aggregator. But when I do so it always end up with a NullPointerException.

    Code:
    Caused by: java.lang.NullPointerException
    	at org.springframework.integration.message.AsyncMessage.getPayload(AsyncMessage.java:70)
    	at org.springframework.integration.endpoint.DefaultEndpoint.isValidReplyMessage(DefaultEndpoint.java:131)
    	at org.springframework.integration.endpoint.AbstractRequestReplyEndpoint.sendInternal(AbstractRequestReplyEndpoint.java:65)
    	at org.springframework.integration.endpoint.AbstractEndpoint.send(AbstractEndpoint.java:111)

  2. #2
    Join Date
    Oct 2007
    Location
    Toronto, ON
    Posts
    90

    Default

    Hi,

    For starters, thanks for using SI! Could you possibly post your configuration file? That could help clarify things a bit. Also, what version are you using?

    Thanks,
    Marius
    Marius Bogoevici,
    Spring Integration Committer

  3. #3
    Join Date
    Dec 2006
    Posts
    11

    Default

    Hi, here's my aggregator:

    Code:
    @MessageEndpoint(input = Channels.AGGREGATOR_CHANNEL, output = Channels.LOG_CHANNEL)
    //@Concurrency(coreSize = 3 , maxSize = 3)
    public class MessageAggregator {
    
        @Aggregator(sendTimeout = 20000L, sendPartialResultsOnTimeout = true)
        public String aggregateMessages(final List<Message> messages) {
            final StringBuilder stringBuilder = new StringBuilder();
            LOGGER.info("# of messages: {}", messages.size());
            for (Message stringMessage : messages) {
                stringBuilder.append(stringMessage.getPayload().toString());
            }
            return stringBuilder.toString();
        }
    Added my configuration as attachments.
    Attached Files Attached Files

  4. #4
    Join Date
    Dec 2006
    Posts
    11

    Default

    I'm using milestone6

  5. #5
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    Can you create a JIRA issue for this?

  6. #6
    Join Date
    Dec 2006
    Posts
    11

    Default

    Created Jira issue: INT-412

  7. #7
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    Thanks! Quite a few things have changes since milestone 6. But turned out quite useful to explore this use case.

    I've reproduced the use case on the HEAD and made a testcase of it. You can follow the story from the bug report.

Posting Permissions

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