[
https://issues.apache.org/jira/browse/CAMEL-27307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-27307.
---------------------------------
Resolution: Fixed
Fixed by https://github.com/apache/camel/pull/30518 (merged to main as
3b942094f8ba, 4.24.0).
> camel-aws2-cw - putMetricData with an empty collection or array body should
> fail with a clear message
> -----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27307
> URL: https://issues.apache.org/jira/browse/CAMEL-27307
> Project: Camel
> Issue Type: Improvement
> Components: camel-aws2
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> Since the producer accepts a {{MetricDatum}}, a collection or an array of
> them as the body ({{Cw2Producer.getMetricData}} / {{toMetricData}}), an empty
> collection or array gives an empty {{metricData}} list, and the producer
> calls {{putMetricData}} with it.
> Against the Floci CloudWatch emulator the call succeeds and nothing is sent,
> so the message passes as if a data point was put. What real AWS CloudWatch
> does with an empty {{MetricData}} was not checked; the API documents
> {{MetricData}} as required.
> Found while documenting the {{aws-cloudwatch-sink}} Kamelet
> (apache/camel-kamelets#3310).
> Expected: an empty collection or array fails the exchange with a clear
> message from the producer (such as "The body is an empty collection: there is
> no MetricDatum to put"), rather than depending on the service.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)