Can't set broker properties on event grid

Diogo Costa 21 Reputation points
2021-06-14T15:32:28.497+00:00

Hi,
I've configured an event grid to send a message to a service bus topic.
105434-image.png

I was expecting the properties to be mapped on the message properties of the Microsoft.Azure.ServiceBus.Message class/be able to see them on the Message Properties.
105390-image.png

As we can see form the image above they are being mapped as custom properties instead of the regular message properties. Same happens when we receive the message on the code side, where we get the value as a user property instead of mapped on the message, so it's not a UI issue.
105368-image.png

From the following links of the documentation I was expecting the message property to get populated:
-https://learn.microsoft.com/en-us/azure/event-grid/delivery-properties
-https://learn.microsoft.com/en-us/rest/api/servicebus/message-headers-and-properties#message-headers

Am I doing something wrong?
Appreciated,
Diogo Costa

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
548 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
319 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 68,656 Reputation points
    2021-06-15T14:39:07.827+00:00

    Hi @Diogo Costa

    I have got the update and only few properties (PartitionKey, SessionId and MessageId) are supported currently. I will be working with my team to update the Service Bus example section with the correct example and supported BrokeredMessage properties.

    I have tested at my end and unfortunately Label is not supported currently. For supported properties (PartitionKey, SessionId and MessageId) you need to define these as HeaderName and the Value which you want to assign.

    Note: Currently not all property are supported. We will update our document with more details.

    Product group will add more fields as per the service bus documentation in the future but currently there is no ETA.

    Below is the screenshot to add the MessageId of dynamic type (static is not supported.) For unsupported property/type you will get error message while saving it as below

    105826-image.png

    105835-image.png

    Feel free to get back to me if you have any queries or concerns.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful