add metadata to servicebus message RRS feed

  • Question

  • Hi,

    I am pushing the POST payload body from the API management to a ServiceBus using a policy (below example which worked for me). I want to read the subscription name on the requests and tag it along on the message metadata going to the service bus. Can you please suggest an approach to do the same.

    <base />
    <authentication-managed-identity resource="https://servicebus.azure.net" output-token-variable-name="msi-access-token" ignore-error="false" />
    <set-header name="Authorization" exists-action="override">
    "Body": "This is the 1st message",
    <set-backend-service base-url="https://{{serviceBusNamespace}}.servicebus.windows.net/{{queue/topic}}/messages" />


    Monday, November 18, 2019 3:30 PM

All replies