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
1 answer

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. "Additionally, the FunctionRoutingResult provides…
0
votes
1 answer

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 properties of the InputObj and send a request. I get…
0
votes
0 answers

Application won't start when adding function.routing.enabled=true with AWS Kinesis binder

I have a Spring Cloud Stream application where I'm using the AWS Kinesis Binder. I have the following configuration in the application.yml file: cloud: stream: bindings: customerEvents-out-0: binder: kinesis …
0
votes
1 answer

Spring Cloud Stream routing function custom header not present in consumer

I'm following this guide for event routing: https://docs.spring.io/spring-cloud-stream/docs/3.2.5-SNAPSHOT/reference/html/spring-cloud-stream.html#_event_routing This is the configuration for the kinesis producer cloud: stream: …
0
votes
1 answer

Spring Cloud Stream multiple consumers for multiple event types in same kinesis stream

High level overview: different types of events are published to the same kinesis stream: OrderCreated, OrderUpdated, CustomerCreated, etc. Those messages are to be consumed by a Spring Cloud Stream application by writing some Consumer functions and…
0
votes
2 answers

Post separate messages in RabbitMQ for each element in a list returned by the producer function

I trying out spring-cloud-funtions, with RabbitMQ integration. So my producer fetches a list of elements with an IO operation (lets say a database call). Instead of the list being posted as one single message, I am trying to make make it post a…
Praveen Dass
  • 586
  • 1
  • 3
  • 13
0
votes
1 answer

Spring cloud Stream custom functional style app configured for topics based on the stream and application name as it working for starter apps

I have created SCDF custom stream apps for sftp source by referring to the starter app. This app is auto-creating a topic for output as - function_name + -out- + index As I looked at the default app the Spring Cloud Data Flow names these topics…
0
votes
0 answers

Spring boot web dependency not working with Spring cloud function

Getting below error while using Spring web dependency with Spring cloud function(jar running in AWS Lambda). Actually I am trying to make rest api call from lambda(built with spring cloud function) to another micro-service. hence while autowiring…
0
votes
1 answer

spring cloud function doesn't register multiple function definitions

I've written a function for transforming object into message @Bean public Function, Message>> publish() { return payload -> { if (payload.getContent().getClass().isPrimitive()) throw new…
0
votes
0 answers

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 function is found and it runs the business logic…
0
votes
2 answers

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 param and headers. but the /example is…
Dale Ogilvie
  • 201
  • 3
  • 8
0
votes
1 answer

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, how can I pass the AWS Kinesis checkpointer to…
0
votes
2 answers

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 Queue for further debugging of the error. I am…
0
votes
1 answer

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 function for publishing to Kafka @Bean public…
0
votes
1 answer

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 foo=sony; bar=pony; baz=tony. Can't figure how…
Anadi Misra
  • 1,925
  • 4
  • 39
  • 68