Announcement Announcement Module
Collapse
No announcement yet.
Not possible to run parallell agregators Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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.

      Comment


      • #4
        I'm using milestone6

        Comment


        • #5
          Can you create a JIRA issue for this?

          Comment


          • #6
            Created Jira issue: INT-412

            Comment


            • #7
              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.

              Comment

              Working...
              X