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

Preserve native message attributes when message is retried via ServiceControl #2356

Open
SzymonPobiega opened this issue Nov 14, 2023 · 1 comment

Comments

@SzymonPobiega
Copy link
Member

Describe the suggested improvement

Is your improvement related to a problem? Please describe.

When a message that contains native attributes is retried via ServiceControl, the retried message does not contain the native attributes that the original message (ingested by ServiceControl) had

Additional Context

No response

@mauroservienti
Copy link
Member

Discussed with Szymon

The transport can preserve message attributes (the native headers) when forwarding the message to ServiceControl. The issue is that ServiceControl won't store them because they are not part of the TransportMessage ingested by ServiceControl.

A hack could be the following:

  • When the input queue pump picks up the message, it serializes the the MessageAttributes dictionary into the TransportMessage headers
  • When the dispatcher dispatches a message, if there is no incoming message and there are the serialized message attributes, it means it's retrying a failed message in ServiceControl, and it'll restore the native message attributes; otherwise it'll remove them from the transport message headers (we don't want to copy those over to all outgoing messages)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants