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

Compatible the HTTP header properties with SNIP-279

Open shibd opened this issue 1 year ago • 0 comments

Motivation

After snip-279, all properties keys and values use json string save to header: X-Pulsar-Property

This PR to compatible with this change when using subscription admin API.

Also, Using snip-279 also avoids the issue where the Go HTTP client automatically formats HTTP headers: https://github.com/golang/go/issues/37834, This will impact the peek command, the previous method might retrieve properties with inconsistent casing compared to the user-defined.

Modifications

  • Compatible the HTTP header properties with SNIP-279

Verifying this change

  • Add TestPeekMessageWithProperties to cover this.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

shibd avatar Oct 23 '24 10:10 shibd