Azure Function coded with spring-cloud-function-adapter-azure SDK cannot return value of form of Mono/Flux.
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
The issue names spring-cloud-function-adapter-azure and shows the HelloHandler examples, but it does not identify a repository file or test. Start by reviewing the adapter and Azure HTTP function invocation path to determine whether Mono and Flux returns are supported. Done should be a clear feasibility answer with the relevant implementation or documentation path identified.
Written by the indexing model from the issue text.
Description
We are using the spring-cloud-function-adapter-azure SDK to build our function.
We expect the return value to be in the form of Mono and Flux, but the we cannot return the corresponding value.
The code link provided by the official website: Getting started with Spring Cloud Function in Azure | Microsoft Docs
After checking the code provided by the official website, we found that only the return value in the HTTP response format was provided as follows:
public class HelloHandler extends FunctionInvoker<User, Greeting> {
@FunctionName("hello")
public HttpResponseMessage execute(
@HttpTrigger(name = "request", methods = {HttpMethod.GET, HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<User>> request,
ExecutionContext context) {
User user = request.getBody()
.filter((u -> u.getName() != null))
.orElseGet(() -> new User(
request.getQueryParameters()
.getOrDefault("name", "world")));
context.getLogger().info("Greeting user name: " + user.getName());
return request
.createResponseBuilder(HttpStatus.OK)
.body(handleRequest(user, context))
.header("Content-Type", "application/json")
.build();
}}
I did not find the return form of Mono and Flux. The return format that we wanted is as follows:
public class HelloHandler extends FunctionInvoker<User, Mono<Greeting>> {
@FunctionName("hello")
public HttpResponseMessage execute(
@HttpTrigger(name = "request", methods = {HttpMethod.GET, HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<User>> request,
ExecutionContext context) {
// ...
}
We want to know whether the return of Mono and Flux is supported on Azure, because the customer found that .NET can return the corresponding value, as follows:
[FunctionName("Httpxample")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HtppREquest req,
Iloogger log
)
Please confirm the feasibility of this request. Thank you very much for your help.
- Dominant language
- Java
- Stars
- 45
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/azure-functions-java-library
-
area:java-functions
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Azure/azure-functions-java-library#229 · 1 comment ·
-
area:java-functions
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/azure-functions-java-library#222 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
area:java-functions
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
area:java-functions
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in Azure/azure-functions-java-library
Similar issues
-
area/plugin
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kestra-io/plugin-kestra#190 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/rocketmq-dashboard#5064 ·