Andrea Cosentino created CAMEL-26522:
----------------------------------------

             Summary: camel-azure-cosmosdb - add bulk item operations for a 
List body, or deprecate the unused createItems, upsertItems and getItems
                 Key: CAMEL-26522
                 URL: https://issues.apache.org/jira/browse/CAMEL-26522
             Project: Camel
          Issue Type: Improvement
          Components: camel-azure
            Reporter: Andrea Cosentino


Follow-up of CAMEL-26246 item 2 ([PR 
#28954|https://github.com/apache/camel/pull/28954]). Since CAMEL-26246, 
createItem, upsertItem and replaceItem fail with an 
{{IllegalArgumentException}} for a List or JSON-array body, and the message 
points to the Split EIP. The List code that no producer operation calls is 
still there:
* {{CosmosDbContainerOperations.createItems}} and {{upsertItems}} are public 
and called by {{CosmosDbContainerOperationsIT}}; they send one request per item 
with {{Flux.flatMap}} and use one partition key for all the items
* {{CosmosDbConfigurationOptionsProxy.getItems}} is public and called nowhere

Decide between:
# bulk producer operations, such as createItems and upsertItems, that take a 
List or a JSON array, on the SDK bulk API 
({{CosmosAsyncContainer.executeBulkOperations}} with {{CosmosBulkOperations}}), 
with the partition key per item, a defined body after the operation (such as a 
List of the status and item of each operation) and a defined way to report 
partial failures; this also needs docs, catalog body types, DSL regeneration, 
unit tests and an IT
# deprecating createItems, upsertItems and getItems for removal, and keep 
documenting the Split EIP

_Claude Code on behalf of Andrea Cosentino (oscerd)_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to