Questions tagged [spring-cloud-function]
Use this tag for questions related to the Spring Cloud Function project
262
questions
0
votes
0
answers
15
views
Spring Cloud Function with Docker
I'm trying to build a Docker image to run on AWS Lambda but when I try to run it locally I get:
Exception in thread "main" java.lang.IllegalStateException: Cannot
locate launcher:
/root/.m2/...
1
vote
2
answers
57
views
JMC Automated Analysis - App uses ~14 GB of Memory?
I am very new to Java Profiling and JMC, so I am struggling to make sense of the data:
This is a simple Spring Azure Function running on my 16GB system.
The JFR was collected as a continuous ...
0
votes
1
answer
12
views
Source IP address missing in APIGatewayProxyRequestEvent
I am building a lambda function using spring-cloud-function (aws-adapter) which will act as a webhook endpoint for Stripe. The lambda has configured a function URL.
What I am trying to do is to allow ...
0
votes
0
answers
11
views
Testing SpringCloudFunction which handles the SQSEvent
The event request passed to the Lambda through FunctionInvoker getting converted to empty object
Unable to find the where exactly the conversion is happening but I could see in the log that input gets ...
0
votes
1
answer
54
views
Spring Azure Function - Unable to load Main Class when running from IntelliJ Azure Toolkit
I am trying to execute Spring Azure Functions from IntelliJ.
The example I am using is here:
https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-samples/function-...
0
votes
2
answers
26
views
Spring cloud function with as http end point with path variable
I want to use Spring cloud function so I started it with as http end point. It works great but how do I use it with path variable. Say I want to make an end point like this: http://localhost:8080/...
0
votes
1
answer
38
views
Java - Azure Functions How can I pass VM arguments?
Hi I need to pass the VM argument -Dspring.profiles.active to an Azure Function App written in Java.
How can I do that via IntelliJ ?
The change needs to be only for this project. I don't want to make ...
2
votes
2
answers
54
views
Problem to deploy simplest Spring Cloud Function application on AWS Lambda using docker image
I having a problem deploying the simplest Spring Cloud Function application to AWS Lambda using a docker image.
@SpringBootApplication
public class GraalvmFuncExampleApplication {
public static ...
0
votes
0
answers
55
views
RoutingFunction bean creation in latest spring boot and spring cloud version
I was spring cloud function in my project. We were using spring boot version 2.6.6 and spring-cloud-function-context version 3.2.3 along with other required dependency.In that I was using ...
0
votes
0
answers
78
views
Spring Cloud Function Actuator Does Not Work In Spring Native
I reviewed the problem and then opened a pull request to spring cloud stream. It was merged upstream and back ported to 4.0.x.
So this problem is solved.
Pull Request Link : https://github.com/spring-...
0
votes
0
answers
49
views
Auto Startup Feature of Spring Cloud Function Not Working in Spring Native(in application.yml)
I can consume and produce data from kafka with Spring Cloud Function. Also, for consumers, I do not allow data to be consumed automatically when the service is starting(auto-startup=false). While the ...
0
votes
1
answer
84
views
How to enable database + kafka transaction in Spring Cloud Stream for producer-only transactions (db + kafka)?
We have an event driven distributed architecture with separate producer and consumer microservices using Spring Cloud Stream and the application needs to perform the following: In the producer, a ...
1
vote
0
answers
20
views
Using two separate binders for RabbitMQ spring cloud function
We are trying to use a single spring consumer function to connect to 2 different queues in 2 different rabbitmq instances.
This doesn't seem to work. The consumer function is bound to the first binder ...
0
votes
0
answers
29
views
Spring Cloud Function Amazon SQSEvent ClassCastException
I'm developing a lambda function for aws using Spring Cloud Function. The function is triggered by a SQSEvent. The problem is that the json received can't be parsed in a SQSEvent instance because the ...
0
votes
0
answers
57
views
Getting 404 Not Found after upgrading springboot version to 2.7.13 and spring-cloud-dependencies to 2021.0.1
I have spring-cloud-function implementation with spring boot
After upgrading to spring boot 2.7.13 and spring-cloud to 2021.0.1 and its higher version , rest endpoint throws 404 response
It works fine ...
0
votes
0
answers
63
views
HTTP Response code is 202 instead of 200 after upgrading spring-cloud-dependency from Greenwich.SR6 to Hoxton
I have a Springboot application with spring-cloud-function.
The implementation is of type Consumer
With spring boot 2.1.5.RELEASE and spring-cloud-dependencies Greenwich.SR6 , on calling the rest api ,...
0
votes
0
answers
51
views
Spring cloud function is not invoked on AWS lambda
I have a function that needs to run on lambda taking an SQSEvent as input. What i see is that, the FunctionInvoker is able to detect the function, but the apply method is not invoked. What might be ...
0
votes
1
answer
32
views
Spring Cloud Stream and Micrometer problem with @Timed annotation on a function
I am using Spring Cloud Stream with Spring Cloud Function there is this simple method that I have:
@Transactional
@Timed(value = "rrems_handle_test", percentiles = [0.5, 0.95, 0.99])
...
0
votes
1
answer
86
views
Communication link failure: Google Cloud Function app can't connect to Google Cloud SQL instance
Problem statement
A Java Spring Cloud Functions application deployed to Google Cloud Function instance doesn't recognize a database setup on Google Cloud SQL instance. Deploying the application to ...
0
votes
1
answer
112
views
Multi channel conditional routing in spring cloud stream
I am using spring cloud stream kafka with functional approach. Have got two topics Topic1 and Topic2 and contains messages related to multiple schema.
Topic1 contains messages of Car and Bike
Topic2 ...
0
votes
0
answers
114
views
Integrating spring cloud function (AWSLambda) and AWS sqs
I am trying to intgerate AWS sqs and AWS lambda. I am using spring cloud function for implementing the lambda. The lambda is configured with a trigger for SQS queue.
Versions used
spring-cloud.version ...
0
votes
0
answers
73
views
Failed to establish route, since neither were provided: 'spring.cloud.function.definition'
I have a problem with a lambda project in java, when the elements arrive to the queue, the lambda consumes them and when they are going to enter the lambda this error comes up
Failed to establish ...
0
votes
1
answer
40
views
Spring Cloud Function - Call via Rest and respond to kafka
I have implemented a Spring Cloud Function as shown below:
public class CloudFunc implements Function<MyDTO, MyDTO> {
@Override
public MyDTO apply(MyDTO input) {
input.setValue("3&...
0
votes
0
answers
23
views
Spring Cloud Function with Reactive types (AWS)
I've been trying to find a simple example of Spring Cloud Function with reactive types to work with AWS, but I think the AWS library itself doesn't support reactive types.
Any recommendations on how ...
0
votes
0
answers
31
views
How to configure spring cloud function to accept only HTTP POST method
I am a new learner to spring-cloud-function framework.
I am trying to build a simple cloud function using spring-cloud-function framework and deploy in GCP cloud function. I am able to deploy it and ...
0
votes
0
answers
60
views
Error about entity when no entity code exists with net.bytebuddy.NamingStrategy$SuffixingRandom$BaseNameResolver
I'm trying to create a spring cloud function for GCP which will run as a background function. Ultimately I'll need to use database logic which is why there's entity and h2, but at the moment the repos,...
0
votes
1
answer
79
views
Is there built-in support for setting an interval for processing message in Spring Cloud Stream?
Currently I have set up a function to consumer Kafka messages as follows:
@Bean(name = "streamSrc")
public java.util.function.Consumer<org.springframework.messaging.Message<byte[]>&...
0
votes
0
answers
71
views
Spring Cloud Function in AWS Lambda - Flux/Mono Cast to Message Error
I am trying to deploy a simple example from the Spring Cloud function docs in AWS lamba using a function with a reactive type, but get the error:
{
"errorType": "ClassCastException&...
0
votes
2
answers
147
views
Spring Cloud Function in AWS - Add Custom Serializer / Deserializer to Jackson
I am writing a spring cloud function (latest build) to deploy into AWS. I understand that the AWS lambda handler uses its own Jackson configuration. I wrote a custom serializer. But, how do I override ...
0
votes
1
answer
180
views
How to use a custom Kafka state store in Spring Cloud Stream application with functional appraoch
I've a spring cloud stream application with latest version and I'm using functional approach. The requirement is to receive a message, avoid duplicate messages (because the producer may publish ...
0
votes
1
answer
77
views
Spring cloud functions azure in gradle multi project
I have a multi project configuration with gradle, where I have 3 projects
Application: here is located every config app file like MainApplication.class (who has the @SpringBootApplication annotation), ...
0
votes
1
answer
208
views
How to run a spring cloud function as AWS lambda using custom java 17 base image?
Java 17 is not supported by aws lambda. I need to create a lambda function using spring cloud and java 17 as base image. What dependencies I must install in my java 17 base image?
I have used this ...
1
vote
0
answers
480
views
How can I configure quic/http3 over spring-cloud-starter-function-web?
I will try use spring-cloud-starter-function-web with quic/http3.
How can I cofigure quic/http3 server?
0
votes
0
answers
79
views
How to write logs for Azure function App slf4j?
I have implemented Azure Function App with Spring Cloud Functions.I am using lombok annotation @Slf4j for logging the messages, but I am not able to see my log file in azure portal. Can any one help ...
0
votes
0
answers
57
views
Busrefresh function.definition of busConsumer is being added on wrong property source
We are using Spring Boot 2.7.8 with Spring Cloud Stream 3.2.6 & Spring Cloud 2021.0.5
We are using the functional definition for our Kafka consumers, hence adding the consumers channel names ...
0
votes
0
answers
60
views
Headers in GET request using Supplier<> in spring cloud function
Like using Message<> we get the headers in Function<>, Is it possible to get Headers inside Supplier<> in spring cloud function?
0
votes
0
answers
55
views
Connecting Spring Cloud function using IAM DB Authentication
I am trying to build a spring cloud function lambda that connects with AWS RDS using the IAM DB authentication.The token generated is valid for only 15 mins. do we need to refresh the token explicitly?...
0
votes
1
answer
627
views
How can I autowire my beans in Spring Cloud Functions in Azure?
Is there any way I can do dependency injection in a Spring Cloud Function that will be running in Azure ?
For example:
package com.example;
import com.example.model.Greeting;
import com.example.model....
0
votes
1
answer
62
views
Forward ApplicationEvent to RabbitMQ using funtions
My application should spread some event from a component to some rabbit message publisher.
My component fires the event using ApplicationEventPublisher.publishEvent(e)
On the other side, a message ...
0
votes
1
answer
208
views
java.lang.ClassNotFoundException when trying to upload a spring cloud function inside a .zip in AWS Lambda
I'm trying to upload a small Spring cloud function app inside a .zip but the runtime can't find the handler method.
The app works just fine if I deploy a .jar directly. But I need to deploy as a .zip ...
0
votes
0
answers
436
views
AWS Lambda with SQS Trigger, SQS Messages are not deleted
I recently encountered a problem with Lambda functions not deleting the SQS Messages after a successful execution.
I've set up a lambda function and SQS Queue as a trigger. Everything was working just ...
3
votes
2
answers
502
views
Spring Integration Flow ClassCastException after Spring Boot 3.0.1 Update
I was working on the Spring Boot Update to 3.0.1 and with it the Upgrade of Spring Integration 6.0.0 and Spring Cloud Stream 4.0.0. After upgrading however my previously working Spring Integration ...
0
votes
0
answers
237
views
Spring Cloud Function logging in AWS Lambda
I created an AWS Lambda function with a Java 11 Corretto runtime. I then created a spring cloud function application and deployed it to the Lambda function. I used slf4j for the logs. For some reason, ...
0
votes
1
answer
73
views
Spring cloud function send image / bytes
I want to receive and send back an image file using Spring Cloud Function Web.
Receiving works fine, but not sending. Somehow only JSON is delivered.
I am using Spring Boot 3.0.0 with Spring Cloud ...
0
votes
0
answers
113
views
How to access Spring Cloud Function from WebClient or Postman
How to access a Spring Cloud Function from a Client Application or Webclient or Postman. The following is the working source code of a Spring Cloud Function and the curl command to access the function....
0
votes
3
answers
314
views
Enable CORS for Spring Cloud Function with Angular
I have a Spring Boot application which is using Spring Cloud function to expose the functions as an end points. Currently we are using angular application as a consumer of the functions from the ...
0
votes
1
answer
139
views
consumption of events stopped after the consumer throw an exception in spring cloud stream?
I have an aggregation function that aggregates events published into output-channel. I have subscribed to the flux generated by the function like below:
@Component
public class EventsAggregator {
@...
0
votes
0
answers
251
views
Kafka Stream with multiple consumers / processors not persisting data concurrently
I'm new with Kafka and want to persist data from kafka topics to database tables (each topic flow to a specific table). I know Kafka connect exists and can be used to achieve this but there are ...
0
votes
1
answer
154
views
passing custom messages downstream in spring cloud function's MessageRoutingCallback
Hey I m using MessageRoutingCallback to route to a function in spring cloud functions. It needs FunctionRoutingResult for routing. I also wanted to edit the message. The spring cloud docs says.
"...
0
votes
1
answer
121
views
Aws lambda json deserilisation provides default values for missing properties
hey I have a function in lambda with spring cloud functions that takes a dataobject as a input param say (InputObj).
The lambda is triggered via an api gateway.
The problem is if I leave out some ...