dapr / java-sdk

Dapr SDK for Java
Apache License 2.0
260 stars 206 forks source link

Why does invokeBinding not return metadata to caller? #765

Open vikas8530 opened 2 years ago

vikas8530 commented 2 years ago

When using SQL binding (tested with Postgres), sidecar is sending metadata and it is available at java-sdk level as well. However sdk only sends data to the caller, it ignores metadata completely.

Use case where metadata is helpful - Insert/Update/Delete queries (exec operation in sidecar) provide number of rows affected and this information is part of metadata. This information is useful for the application hence it should be sent to the caller.

Do we have any helper to get the metadata after invoking invokeBInding? If not, would like to get inputs for the use case.

Refs: https://docs.dapr.io/reference/components-reference/supported-bindings/postgres/ https://github.com/dapr/java-sdk/blob/866b166e110a1b335396712b74dffe6410d7a7a9/sdk/src/main/java/io/dapr/client/DaprClientGrpc.java#L256

salaboy commented 3 months ago

This is a good point, and I think this highlights the need for some other more flexible options for bindings