Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
davidferguson
Contributor III
Contributor III

How to specify the method to call for an AggregationStrategy

Hi there,

 

I'm using various enterprise integration patterns that support exchange aggregation within Talend routes (e.g. Content-Enricher, Aggregator, Recipient-List and so on) and am able to create a bean that implements the AggregationStrategy interface just fine.

 

However, I was wondering how I would go about implementing a bean where I define multiple aggregate methods (with custom names) within the same bean. The use-case here is that I need to aggregate multiple times within a route and having to create separate beans each time is a bit silly. According to the documentation for poll enrich for example, I should be able somehow define a parameter called strategyMethodName to specify the aggregation strategy method name to use.

 

The problem is, I can't figure out how to do this in Talend as the Aggregation Strategy field in the cContentEnricher Talend component for example is hard-coded to create a new instance of my bean so I can't so something like:

...
.pollEnrich(
    "file:path/to/file/?fileName=some.file",
    3000,
    AggregationStrategies.bean(
        new beans.CustomAggregation(), "myCustomAggregationMethodName"
    )
)
...

Reference documentation for the AggregationStrategies.bean method here.

 

Does anyone know how to call a custom method name for aggregation in Talend? Maybe using cBean or cBeanRegister? I'm using Talend ESB 6.4.1

 

Thanks!

Labels (3)
1 Solution

Accepted Solutions
davidferguson
Contributor III
Contributor III
Author

Ended up going with a cJavaDSLProcessor and implementing it myself. Not pretty, but it works.

View solution in original post

2 Replies
davidferguson
Contributor III
Contributor III
Author

Bumpity-bump.
davidferguson
Contributor III
Contributor III
Author

Ended up going with a cJavaDSLProcessor and implementing it myself. Not pretty, but it works.