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

Support "Promotion" of CloudEvent attributes to Service Bus Headers. #41575

Open
Euan-McVie opened this issue Jan 25, 2024 · 1 comment
Open
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Bus
Milestone

Comments

@Euan-McVie
Copy link

Library name

Azure.Core

Please describe the feature.

Hi,

We are currently using the CloudEvent type for ServiceBus as per https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/samples/Sample11_CloudEvents.md

In order for us to use a SqlFilter on the subscriber we are creating the service bus message using:

// message is an Azure.Messaging.CloudEvent from the methods parameter.
new ServiceBusMessage(new BinaryData(message))
{
    ContentType = "application/cloudevents+json",
    ApplicationProperties =
    {
        { "ce-type", message.Type },
        { "ce-source", message.Source },
        { "ce-specversion", "1.0" } // Can't use message.SpecVersion as the property is internal :(
    }
});

To help support formally rolling out CloudEvents across other Azure services it would be great if there was an extension to the ServiceBus SDK to help remove some of this boilerplate code so that there would be some form of:

message.ToServiceBusMessage(includeAttributesAsApplicationProperties: true)
@Euan-McVie Euan-McVie changed the title Support "Promotion" of CloudEvent attributes to Headers. Support "Promotion" of CloudEvent attributes to Service Bus Headers. Jan 25, 2024
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus labels Jan 25, 2024
@jsquire jsquire added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-team-triage Workflow: This issue needs the team to triage. labels Jan 25, 2024
@jsquire jsquire added this to the Backlog milestone Jan 25, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jan 25, 2024
@jsquire
Copy link
Member

jsquire commented Jan 25, 2024

Hi @Euan-McVie. Thank you for reaching out with your suggestion. I've added this to our backlog for consideration.

//cc: @JoshLove-msft, @m-redding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Bus
Projects
Status: No status
Development

No branches or pull requests

2 participants