Skip to content

Binder preserves headers on send/receive #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

onobc
Copy link
Collaborator

@onobc onobc commented Feb 22, 2023

  • Refactor the existing PulsarMessageHeaderMapper to include to/from support.
  • Use the new API in the binder send/receive
  • Add tests for header mapper

See #358

@onobc onobc changed the title Binder preserves headers on send/receive [WIP] Binder preserves headers on send/receive Feb 22, 2023
@onobc
Copy link
Collaborator Author

onobc commented Feb 22, 2023

Complex header values

  • Spring MessageHeaders have Object values
  • Pulsar message properties have String values

In the 1st commit I simple called toString on the send side. Interestingly enough, this was sufficient for fields such as UID and Timestamp. The message header code must be doing some smarts via string serialization. @sobychacko can you confirm this?

@sobychacko
Copy link
Collaborator

@onobc When we added the Pulsar headers support to the regular listener, I don't think we added anything in terms of serialization. We can chat further about it offline.

@onobc onobc changed the title [WIP] Binder preserves headers on send/receive Binder preserves headers on send/receive Feb 24, 2023
@onobc onobc force-pushed the cbono-preserve-headers branch from 213e851 to 0292c62 Compare February 24, 2023 04:35
@onobc onobc requested a review from sobychacko February 24, 2023 04:36
- Refactor the existing PulsarMessageHeaderMapper to include to/from support.
- Use the new API in the binder send/receive
- Add tests for header mapper

See spring-projects#358
@onobc onobc force-pushed the cbono-preserve-headers branch from 0292c62 to 6788f79 Compare February 24, 2023 04:43
@onobc
Copy link
Collaborator Author

onobc commented Feb 24, 2023

TODO

  • in subsequent PR need to add support for complex header types (see DefaultKafkaHeaderMapper for inspiration)
  • in subsequent PR need to add support for filtering what headers are considered (see DefaultKafkaHeaderMapper for inspiration)
  • in subsequent PR make mapper auto-configured and user extendable

@onobc onobc merged commit 0458f01 into spring-projects:main Feb 24, 2023
@onobc onobc deleted the cbono-preserve-headers branch February 24, 2023 15:31
@onobc onobc added this to the 1.0.0 milestone Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants