Questions tagged [spring-cloud-function]

Use this tag for questions related to the Spring Cloud Function project

Spring Cloud Function is a project in a Spring Cloud portfolio of projects with the following high-level goals:

  • Promote the implementation of business logic via java.util.function.(Supplier, Function, Consumer)
  • Provide necessary deployment and runtime abstractions to ensure the same code can run in multiple environments (e.g., a web endpoint, a stream processor, or a task).
  • Support a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS).
  • Enable Spring Boot features (auto-configuration, dependency injection, metrics) on serverless providers.

Resources

See Also

255 questions
0
votes
0 answers

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 the issue with configuration…
0
votes
1 answer

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]) @Bean fun handleTest() = fun(it: Message):…
0
votes
1 answer

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 Cloud Function service using: gcloud alpha functions…
0
votes
1 answer

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 contains messages related to Fruits and…
MusicMan
  • 914
  • 1
  • 7
  • 18
0
votes
0 answers

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 2022.0.3 Java 17 spring-cloud-aws-dependencies…
0
votes
0 answers

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 route, since neither were provided:…
PereZix
  • 41
  • 4
0
votes
1 answer

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 { @Override public MyDTO apply(MyDTO input) { input.setValue("3"); return input; } } I added below properties in…
0
votes
0 answers

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 to extend support for this? Thanks
user521990
  • 669
  • 1
  • 5
  • 21
0
votes
0 answers

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 test it out. However, it is accepting all the HTTP…
0
votes
0 answers

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, entities, etc do not exist. I have two classes,…
0
votes
1 answer

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> consumeStream() { return message -> { byte[] rawMessage…
0
votes
0 answers

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", "errorMessage": "reactor.core.publisher.FluxMapFuseable cannot…
user521990
  • 669
  • 1
  • 5
  • 21
0
votes
2 answers

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 or configure the default AWS lambda one? package…
user521990
  • 669
  • 1
  • 5
  • 21
0
votes
1 answer

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 duplicate messages), then transform the message and…
0
votes
1 answer

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), the functions app files (host.json and…