mbot
mbot

Reputation: 11

Wso2 api manager. Add custom property to throttilng event message payload

I am new to WSO2 API Manager. My application has customized identity server that adds new attribute to messageContext, for example String color="red". Now I need to add throttling with this attribute by creating a custom siddhi query. It accepts only standard key templates: resourceKey, userId, apiContext, apiVersion, appTenant, apiTenant, appId, clientIp. Unfortunately I can't find out how to pass custom attribute to throttle event receiver and throttle request stream. Any ideas how to do this?

Upvotes: 1

Views: 186

Answers (1)

menaka_
menaka_

Reputation: 1100

If it is possible to set this value as a header parameter, you can use Advanced policies with a Header parameter condition.

https://apim.docs.wso2.com/en/latest/learn/rate-limiting/adding-new-throttling-policies/#adding-a-new-advanced-throttling-policy

Upvotes: 1

Related Questions