Skip to content
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

Propose adding receiver transformer for message queue protocols #1054

Open
yanmxa opened this issue May 13, 2024 · 0 comments
Open

Propose adding receiver transformer for message queue protocols #1054

yanmxa opened this issue May 13, 2024 · 0 comments

Comments

@yanmxa
Copy link
Contributor

yanmxa commented May 13, 2024

Some of the event metadata might differ between sender and receiver. Like the Kafka protocol, we expect to add the topic/partition/offset information after receiving the event.

  • Sender
Context Attributes,
  specversion: 1.0
  ...
  datacontenttype: application/json
Data,
  {
    "id": 0,
    "message": "Hello, World!"
  }
  • Reciever
Context Attributes,
  specversion: 1.0
  ...
  datacontenttype: application/json
Extensions,
  kafkaoffset: 543
  kafkapartition: 0
  kafkatopic: test-confluent-topic
Data,
  {
    "id": 0,
    "message": "Hello, World!"
  }

It works fine when transferring the event with binary mode. But the event metadata become the same between sender and receiver in the structured mode. So I propose adding receiver transformers to modify the event metadata for the receiver.

However, I am concerned about whether this will undermine the original design intent of the structured mode. Therefore, I opened the issue here for discussing. At the same time, to express my ideas more clearly, I also drafted a PR to demonstrate possible code changes: #1053

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 a pull request may close this issue.

1 participant