-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
Needs TriageThis issue needs to be investigated by a maintainerThis issue needs to be investigated by a maintainer
Description
Currently our Context Enrichment is handled here:
Lines 107 to 124 in 122119b
| Exception metadataException = null; | |
| log.debug("Initializing sync stream request"); | |
| final GetMetadataRequest.Builder metadataRequest = GetMetadataRequest.newBuilder(); | |
| GetMetadataResponse metadataResponse = GetMetadataResponse.getDefaultInstance(); | |
| try (CancellableContext context = Context.current().withCancellation()) { | |
| try { | |
| metadataResponse = grpcConnector.getResolver().getMetadata(metadataRequest.build()); | |
| } catch (Exception e) { | |
| // the chances this call fails but the syncRequest does not are slim | |
| // it could be that the server doesn't implement this RPC | |
| // instead of logging and throwing here, retain the exception and handle in the | |
| // stream logic below | |
| metadataException = e; | |
| log.debug("Metadata exception: {}", e.getMessage(), e); | |
| } |
We always try to fetch the metadata before we reestablish a connection, during our stream listening logic.
This might be a little bit tricky, as we are always relying on the same process, and if eg. the timeline exceeds etc. the whole process breaks.
The question is how important it is to fetch this metadata, as we could theoretically also do this unary call when the channel state changes to READY, instead of always during the loop.
This would decouple our sync from the metadata, and might increase our robustness.
WDYT?
cc: @guidobrei @toddbaert @beeme1mr @alexandraoberaigner @chrfwow
Metadata
Metadata
Assignees
Labels
Needs TriageThis issue needs to be investigated by a maintainerThis issue needs to be investigated by a maintainer