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
2 answers

How to get the metadata of Pub/Sub event in Spring Cloud function on Google Cloud Function

I have created a simple Google Cloud Function with Spring Cloud Function library to get triggered on the arrival of the Pub/Sub message. I followed the sample function-sample-gcp-background. Whenever a message is triggered to the Pub/Sub, it gets…
Manu
  • 3,467
  • 3
  • 29
  • 28
0
votes
1 answer

Auto queue exchange creation with spring cloud function and rabbitmq

We are creating a rabbitMq consumer using the new spring cloud function library. However we find that on startup of the application, we don't see the queues or exchanges create on the rabbitMq instance. Here is our config. spring: cloud: …
0
votes
1 answer

Programatically bind a single spring cloud function to several inputs

In my application all incoming messages sit in a number of message broker topics. What I would like to have is a Spring cloud function whose input is bound to all of these topics, so that messages from any topic would be processed by that cloud…
Alexey Buistov
  • 209
  • 2
  • 4
  • 11
0
votes
2 answers

Spring Cloud Function (GCP adapter) throws Hibernate lazy could not initialize proxy - no session

This is a common error in Spring when tries to transform automatically an entity object whit some hibernate proxys but i dont't know how to load Jackson DataType Hibernate5 module in Spring cloud functions gcp…
Israel Perales
  • 2,192
  • 2
  • 25
  • 30
0
votes
1 answer

AWS Lambda with Apache Kafka Trigger returns "PROBLEM: Lambda internal error. Please contact Lambda customer support."

I am using Spring Cloud Functions with Kafka Binder. My application SpringcloudfuncApplication.class is pretty straightforward as can be seen below: @SpringBootApplication @Log4j2 public class SpringcloudfuncApplication { public static void…
junbetterway
  • 236
  • 3
  • 13
0
votes
1 answer

Spring Cloud function conflicts with Apache Hadoop lib

After including Apache Hadoop common in spring cloud function app, it fails with below error Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext…
Premier
  • 4,160
  • 6
  • 44
  • 58
0
votes
0 answers

Spring cloud stream reactive kafka producer ack

Can someone point me to examples or documentation of Kafka producer written in Spring cloud stream reactive way to obtain an ack back when the publish to kafka broker is successful or when failed in a synchronous way?
0
votes
1 answer

How to shut down Spring Boot Kafka stream-processing app after current message

In a Spring Boot Kafka stream-processing app using Spring Cloud Function, how can I shut down the application (to stop it receiving any further messages) but only after responding to the current message? The scenario is this: we have an app that…
0
votes
0 answers

Junit5 using WebTestClient failing for Spring Function

I have written a Spring Function and I am able to run junit to validate function. Howerver, if I am try to run junit to test same function as Http endpoint, below error is thrown. java.lang.AssertionError: Status expected:<200 OK> but was:<404…
0
votes
1 answer

ClassCastException when casting return value from a function utilizing catalog.lookup

Trying to use Spring Cloud Functions, I created an external jar file which contained a single class like the following: Public class A implements Function{ Public B apply(String s){ //... return instance of B; } } Where B is a…
0
votes
1 answer

Spring Cloud Stream functional approach: message conversion produces an object with empty field values

I'm trying to create a reactive Spring Cloud Stream application with kafka following the functional approach (Spring Boot: 2.3.4, SC: Hoxton.SR9, SC Stream: 3.0.9, SC Function 3.0.11). Problem: Automatically deserialized object has empty field…
0
votes
1 answer

Multiple Spring Integration flows as workers to consume from many SQS queues

I have many SQS queues to which I have to attach workers to consume and process messages (using spring integration flow). My initial thought is to have a single spring boot application with 1 channel per SQS queue(spring integration aws). This will…
Nikhil
  • 345
  • 2
  • 13
0
votes
1 answer

Can spring cloud functions get access to any spring managed component?

I'm working on a spring-cloud-function with Azure-functions. Is it possible to use any spring managed components within the "handlers" (extending AzureSpringBootRequestHandler) ? I tried to narrow this down with the sample…
0
votes
1 answer

How spring-cloud-function-deployer deploy/undeploy function at runtime?

I am trying to build my own faas service.I want to support load the function at runtime. @SpringBootApplication @EnableScheduling public class DeployerApplication { FunctionCatalog catalog; @Scheduled(cron = "0/5 * * * * ?") void…
0
votes
4 answers

Spring Cloud Stream routing-expression for a dedicated Binding

I would like to have a binding that connects to a specific queue/topic and routes to the right function based on a specific header entry. I could not find any example for this case. I have tried several approaches, but with none of them I had…
MikeR13
  • 21
  • 5