You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/07/27 13:07:55 UTC
[GitHub] [apisix-java-plugin-runner] dargoner opened a new issue, #173: request help: 如何获取consumer_name或者设置consumer
dargoner opened a new issue, #173:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/173
### Issue description
请问如何在 filter 方法中获取consumer_name或者设置consumer_name到 ctx
lua版有 consumer_mod.attach_consumer(ctx, consumer, consumer_conf),但是 Java插件好像没提供
### Environment
* your apisix-java-plugin-runner 0.2-master
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-java-plugin-runner] dargoner closed issue #173: request help: 如何获取consumer_name或者设置consumer
Posted by GitBox <gi...@apache.org>.
dargoner closed issue #173: request help: 如何获取consumer_name或者设置consumer
URL: https://github.com/apache/apisix-java-plugin-runner/issues/173
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #173: request help: 如何获取consumer_name或者设置consumer
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #173:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/173#issuecomment-1197629403
`consumer_name ` is var in APISIX, so you can use
```
@Override
public List<String> requiredVars() {
List<String> vars = new ArrayList<>();
vars.add("consumer_name");
return vars;
}
```
ref: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#the-functions-must-be-implemented-of-filter-execution
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org