Skip to content

Conversation

ramonsmits
Copy link
Member

@ramonsmits ramonsmits commented Oct 10, 2024

Alternatives:

  1. Have a generic extension point Action<TransportOperation, ServiceBusMessage> that any customizations on the native message type and use this from the ******** connector.
  2. Add extensions methods to transport operations to have type safe APIs to set these values explicitly.

@ramonsmits ramonsmits self-assigned this Oct 10, 2024
var properties = outgoingTransportOperation.Properties;
var headers = outgoingTransportOperation.Message.Headers;

if (properties.TryGetValue(Headers.CorrelationId, out var correlationId))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I recall, the properties get serialized into the outbox. It might be worthwhile considering removing those temporary properties after reading them or add a comment why they need to be preserved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick question. Technically, already today, it is possible to add a customization delegate that allows you to customize the entire native message created. Any reason this can't be used?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And yes, it seems the customizer should also be removed from the properties dictionary because I doubt we can every serialize action delegates into outbox records.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I didn't know that TransportTransaction was itself a ContextBag 🤯
  2. Looked at the type you linked but I haven't figured out how that could be used as so far all invoked types I see are internal

So, I need additional research to validate if this could be used for the ******* connector.

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