Questions tagged [spring-cloud-function]
Use this tag for questions related to the Spring Cloud Function project
223
questions
0
votes
0
answers
27
views
Spring Cloud Function with AWS API Gateway and AWS Lambda
Using the handler org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest I'm receiving the following error when calling my API Gateway endpoint with the payload below. The ...
0
votes
0
answers
11
views
Spring Cloud Function - UnicastProcessor.create() is deprecated
I am using Spring Boot and Spring Cloud Function - trying to convert below function to because UnicastProcessor.create() is deprecated.
public static Function<Flux<Integer>, Tuple2<Flux<...
0
votes
2
answers
43
views
How to obtain path of request in spring cloud function on AWS Lambda
I can obtain all I need from the incoming request except for the path component of the request.
e.g. for a postman request for xxx.lambda-url.us-west-2.on.aws/example?param=true
I can see host, query ...
1
vote
2
answers
35
views
Can Spring Cloud Function be used with AWS Lambda base image
I try to deploy a function on AWS Lambda by a container image, but I cannot find an example of how to build it with the AWS lambda base image. Does Spring Cloud Function support this deploy method or ...
0
votes
1
answer
39
views
How do you pass Kinesis headers to Spring Cloud Stream functions in batch consumer mode?
I am in the process of converting our existing stream processing code that currently uses the annotation-based programming model to use Spring Cloud Function instead. With consumer batch mode enabled, ...
1
vote
0
answers
25
views
Nullpointer Exceptions on Spring Cloud Function when calling sam local
i am trying to get a Spring Function runnin von AWS sam local, however even though i got a handler and an exposed function Bean i am constantly getting a Nullpointer.
@SpringBootApplication
public ...
0
votes
1
answer
40
views
How to configure DeadLetterPublisherRecoverer to send error messages to a DLQ in Spring Cloud Stream batch mode
I have created a Kafka Consumer using Spring Cloud Stream and Spring Cloud Function for consuming messages in batch mode from a Kafka topic. Now, I want to send the error batches to a Dead Letter ...
0
votes
1
answer
25
views
Kafka Binder doesn't apply serializer configuration
I'm using stream bridge in my app since the topic to send is decided at runtime based on URL path params; I build a message from the Request Body, Path Elements and call stream bridge send to a ...
0
votes
1
answer
16
views
How to map path elements to method parameter in spring cloud function web
I'm working on a Microservice that receives webhooks, the idea is to use path variables for some processing down stream,
/webhooks/{foo}/{bar}/{baz}
for example
/webhooks/sony/pony/tony would populate ...
0
votes
0
answers
16
views
Warmup of a Spring cloud functions based solution in azure
We are working in a spring cloud functions based solution, this solution will be deployed into azure.
We have implemented several functions but we have some warmup time when we start the spring ...
2
votes
0
answers
48
views
Accessing spring cloud function rabbit binding details
I'm attempting to update the "Springwolf" library (used to document async API definitions) to support rabbit consumer listeners using spring cloud functions for spring cloud stream. In ...
0
votes
0
answers
75
views
Spring Cloud Stream - unable to serialize java class (works for java record)
Hi I am having an issue with new functional spring cloud stream...
I have a basic example:
@Autowired
private StreamBridge streamBridge;
@PostMapping("/publish/{topic}")
// fails
...
0
votes
1
answer
30
views
Spring Cloud Function - how to pass multiple parameters to a function call in Kotlin
In the documentation for Spring Cloud Function, the examples for Kotlin consist of function that takes a single parameter, e.g.
@Bean
open fun lower(): (String) -> String = { it.lowercase() }
...
0
votes
0
answers
37
views
Handle partially failed batch with spring cloud streams
When using spring-cloud-stream for streaming application (functional style) with batches, is there a way to retry/DLQ a failed message but also process (stream) the non-failing records?
for example:
...
1
vote
1
answer
195
views
No plugin found for prefix 'azure-function' in the current project and in the plugin groups
I have been trying to run a spring-cloud-azure-function on my local machine. But it looks like I am having a hard time in figuring out the pom plugins. I have tried from the Microsoft Doc of how to ...
1
vote
3
answers
323
views
Amazon API Gateway and Spring cloud gateway use case
I am working on a distributed application project where there is need for rate limiting and authentication depending on the client consuming the service on an api gateway. I am wondering the best ...
0
votes
0
answers
21
views
How to autowire objects in spring cloud function?
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException
Main Class
FunctionalSpringApplication.run(.class, ...
0
votes
1
answer
120
views
How to log around Spring Cloud Stream functions?
I have a simple Spring cloud Stream function
package com.example
@Configuration
public class Processor {
@Bean
public Function<Message<String>, Message<String>> mapper()...
1
vote
1
answer
53
views
Integration Test a Reactive Spring Cloud Stream
TLDR; How do you test a Reactive Function composition using the Test Binder?
I have a Spring Cloud Stream that uses Reactive Functions and I don't know how to test it. I don't see any official docs on ...
0
votes
0
answers
42
views
AWS adaptor with Spring Cloud function - payload body is removed
I am building a AWS lambda function using Spring cloud, aws adapter and spring native.
The lambda is fronted by a APIGateway HTTP API V2.0.
<java.version>11</java.version>
<...
0
votes
1
answer
41
views
spring function in aws lambda not sending back status code
I had the following code working and returning a statusCode.
final APIGatewayProxyResponseEvent responseEvent = new APIGatewayProxyResponseEvent();
responseEvent.setHeaders(Map.of(...
0
votes
1
answer
90
views
spring-cloud-stream dependency upgrade not updating child dependencies
I have update the dependency spring-cloud-stream to resolve the vulnerability issues in spring-cloud-function-context which is the child compile dependency of:
<dependency>
&...
0
votes
0
answers
34
views
Spring Cloud Routing Function and SPEL Expression injection - CVE-2022-22963
I am having a springboot application and my local maven repository is having spring cloud dependencies present in it. I understand that for someone to use the CVE-2022-22963 vulnerability, the code ...
1
vote
1
answer
69
views
How to use the functional style on my RemoteChunkingManagerStepBuilderFactory?
I am implementing Spring Batch-Integration RemoteChunking. https://docs.spring.io/spring-batch/docs/current/reference/html/spring-batch-integration.html#remote-chunking
I've come across the ...
1
vote
1
answer
86
views
How to pass a parameter to a Spring Cloud Function?
I'm following the Spring Cloud Function tutorial.
In the example, they are calling the revert bean with this command:
curl localhost:8080/reverseString -H "Content-Type: text/plain" -d "...
0
votes
0
answers
101
views
How to get Context for logging when using APIGatewayProxyRequestEvent in aws-lambda
My project is written in spring-cloud-function and deployed in aws-lambda. I have a requirement wherein I am supposed to log the events.
A little search told me to use
com.amazonaws.services.lambda....
0
votes
0
answers
81
views
POST search api execution throwing Execution failed due to configuration error: Status code must be between 100 and 599
I have spring-cloud-function project deployed in aws-lambda hit by api-gateway.
I have a search api implemented using POST method with the following request body
{
"criteria": {
"...
0
votes
0
answers
50
views
Spring cloud function - accept query parameter and header
I have been reading about lambda and spring cloud functions, is there anyway to get hold of query parameters and the headers in the lambda.
I created a function<Message, Customer>, but Message ...
0
votes
1
answer
128
views
custom exception message in spring cloud function deployed in aws-lambda
I have a java project written using spring-cloud-function and deployed in aws-lambda.
I am trying to return a custom exception with some fields in the exception message body, something like"
{
...
0
votes
1
answer
183
views
How to get path parameter in spring cloud function
I have a java application written using spring-cloud-functions and deployed in aws lambda which connects to aws api-gateway
I have a 'GET' api(let's say /employees/{employeeId}) which takes an input ...
0
votes
1
answer
70
views
GCP Cloud Functions with spring cloud function and spring native
I have been trying to deploy a GCP cloud function using Spring Cloud Function and Spring Native unfortunately it seems that GCP is blocking the AOT mode as shown in the photo "AOT mode disabled&...
0
votes
0
answers
24
views
How to allow/fix CORS error when front end app of Reactjs calls Spring cloud function deployed as backend?
I have created backend application with Spring cloud function for save/returning data using Spring cloud version 2021.0.0 and Spring boot version 2.6.3
Our Front end app is simple and is developed in ...
1
vote
2
answers
285
views
Is Spring Cloud Stream affected by CVE-2022-22963 (spring cloud function)
The CVE-2022-22963 - spring cloud function vulnerability was recently discovered and a simple fix was provided by the team here: cve-report-published-for-spring-cloud-function
We are getting spring-...
0
votes
0
answers
86
views
Deserializing a json to an abstract class in spring cloud functions
I have a java project written using spring cloud functions and deployed in aws lambda. I have a scenario wherein I have an abstract class extended by 3 other classes.
The function catering to the ...
0
votes
0
answers
161
views
Spring cloud stream Functional Programming
I was trying to consume a Kafka Message and publish two message to different Topic .
spring.cloud.stream.bindings.slotNotification-in-0:
destination: customer
spring.cloud.stream.bindings....
1
vote
1
answer
123
views
Spring Cloud Function GCP exclude for Spring Cloud Stream for PubSub
I combine both Spring Cloud Function for GCP and Spring Cloud Stream for PubSub in the same project.
I have one function which is an entrypoint for GCP CF defined in my properties
spring.cloud....
0
votes
2
answers
235
views
java.lang.ClassCastException: class org.eclipse.jetty.server.Request$1 in Spring Cloud Function
Sample repo available on Github.
Given this simple Spring Cloud Function application:
@SpringBootApplication
class SpringServerlessGcpApplication{
private val random = SecureRandom()
@Bean
...
0
votes
0
answers
274
views
Spring Sleuth not injecting trace information when using reactive producer
We have this application that has to send and receive messages over RabbitMQ. In the past I've used @StreamListener in combination with RabbitTemplate to send and receive messages. This works with ...
0
votes
2
answers
307
views
Spring cloud function architecture with multiple functions
I just started a new project where I'm going to use Java, Spring cloud functions and AWS Lambda.
It's my first time building a serverless application and I've been looking at different example ...
0
votes
0
answers
154
views
Spring cloud function accessing query parameters
Is it possible to access to query parameters that are forwarded from aws apigateway to awslamdba implemented using spring cloud function. the following is my implementation.
I call this using http get ...
0
votes
0
answers
112
views
Enable Metrics on AWS Lambda Spring Cloud Function using Kotlin
I am working on a POC where I am aiming to create a aws lambda function using spring cloud function, as requirement I also need to be able to generate metrics when the functions run, in spring-cloud-...
0
votes
0
answers
80
views
Spring Cloud Function with Azure SB Trigger for batch throws ClassClassException
I am trying to process messages on ASB topic with an Azure Function 'as a batch' using SBTriggerTopic annotation(Notice the cascade.MANY and messages being a List) with azure-function-java-lib 1.4.2
@...
0
votes
2
answers
426
views
Spring cloud function in azure throws null pointer exception
I have spring cloud function deployed to azure function app.The API works perfectly fine in the local developer machine. Whereas when deployed to azure, upon calling from postman/client throws a null ...
0
votes
1
answer
116
views
How can you find out from spring cloud function that the connection you established to the database is closed?
In a spring cloud function usage, you don't want your database connection to keep existing in the database. Once the spring cloud function finishes its process, is the following way to close the ...
0
votes
0
answers
37
views
How does Spring cloud function compose function of different types
I don't understand something regrading spring cloud functions.
Say I have the following beans:
@Bean
Function<String, String> uppercase() {
return String::toUpperCase;
}
@Bean
...
1
vote
0
answers
166
views
Is there a way to increase the Token expiry time for AuroraPostgres RDS Database?
Aurora Postgresql running on an AWS RDS has a token expiry time of 15 minutes. Unlike using a username and password to authenticate, if we use a token to authenticate as shown below, the Spring cloud ...
0
votes
0
answers
70
views
How to invoke a Spring Cloud Integration test from AWS Lambda Console?
I have written a SpringBootTest which invokes a spring cloud function. The main goal of this test is to accept an APIGatewayProxyRequestEvent and assert the response after execution of all functions. ...
0
votes
1
answer
289
views
Spring cloud function routing api gateway null pointer exception
I have a problem with routing using API Gateway headers. I am using org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest as a handler request. I have two functions, they work ...
0
votes
1
answer
434
views
AWS API Gateway Response Template Mapping json string cannot be converted
My Spring Cloud Function(v3.1.6) based AWS Lambda function (without Lambda proxy integration) returns a list of data via API Gateway in the following format:
{
"isBase64Encoded": false,
&...
0
votes
1
answer
154
views
Spring Cloud Function Composition
I am trying spring cloud function with aws lambda.
Lets say, I have 5 different spring function (A,B,C,D,E) and function composition of like this A|B|C|D|E.
I specify which function to invoke using ...