pulsar-client-go icon indicating copy to clipboard operation
pulsar-client-go copied to clipboard

[feat] Add Reader interceptor

Open dao-jun opened this issue 2 years ago • 3 comments

Fixes https://github.com/apache/pulsar-client-go/issues/937

Motivation

Add Reader interceptor

Modifications

Describe the modifications you've done.

Verifying this change

  • [ ] Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (GoDocs)

dao-jun avatar Feb 21 '23 17:02 dao-jun

Tests to be completed

dao-jun avatar Feb 21 '23 17:02 dao-jun

@dao-jun Can you resolve the conflict and add a unit test?

shibd avatar Mar 13 '23 03:03 shibd

It would be much easier to use this interceptor with tracing libraries like OpenTelemetry if a Context was included in the signature. I've gone into more detail in this other PR but the short version is that if span IDs, timings, etc can be passed through the context then it removes the need to maintain an external data structure, managed by the interceptor, for every request.

treuherz avatar Jan 29 '24 10:01 treuherz