Hello Camel riders

Here is my sample route.

  from("timer:java?period=1000")
                .setProperty("uuid").simple("${exchangeId}")
                .setBody()
                .simple("Hello Camel from ${uuid} at ${date:now:yyyy-MM-dd
HH:mm:ss.SSS}")

.setHeader("CamelGooglePubsubAttributes").mvel("['key1':'value1',
'key2':'${uuid}']")
                .to("seda:startAggr");

        from("seda:startAggr")

                // aggregates all using the same expression and group the
                // exchanges, so we get one single exchange containing all
                // the others
               .aggregate(new GroupedExchangeAggregationStrategy()).constant
(true).completionSize(5)
            //.aggregate(new
GroupedBodyAggregationStrategy()).constant(true).completionSize(5)
                .log("aggregated ${body}")
                .log("Properties: ${exchangeProperty.CamelAggregatedSize}")
                .to(
"google-pubsub:test-project:test-topic?serviceAccountKey=file:///C:/work/camel-demos//testaggr//camel-pubsub-component.json"
)
                .to("seda:anotherOne").end();


This is working from Camel to Endpoint - 5 exchanges are being grouped and
I can see 5 payloads written into Google PubSub.

normally, when an endpoint is invoked, it would return specific responses.
How does one go about accessing responses for a grouped exchange?

Reply via email to