spring-cloud-function

How to extract body and file name from mulitpart file?

假如想象 提交于 2021-01-29 10:09:32
问题 I am writing an AWS lambada in Java. This lambda acts as a handler for APIGatewayProxyRequestEvent. API gateway endpoint is sending a file as a multipart/form-data in the body. public class LambdaHandler extends SpringBootRequestHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> { --- } while trying to implement the business logic, I am first extracting the body into an array of bytes byte[] file = Base64.decodeBase64(event.getBody().getBytes()); But when I write these bytes

/lib64/libc.so.6: version `GLIBC_2.32' not found

喜夏-厌秋 提交于 2020-12-15 04:54:28
问题 I'm building the lambda on Ubuntu with the basic example. It builds without any errors but if I upload and test it on aws in crashes with: { "errorMessage": "RequestId: 7f4d0aca-125c-4032-98dd-9ff387e5252b Error: Runtime exited with error: exit status 1", "errorType": "Runtime.ExitError" } The log output is: START RequestId: 7f4d0aca-125c-4032-98dd-9ff387e5252b Version: $LATEST.~.jwtauthorizeraws.jwtauthorizerawsapplication: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by ./~

Spring Cloud Function - Separate routing-expression for different Consumer

泪湿孤枕 提交于 2020-04-30 07:13:23
问题 I have a service, which receives different structured messages from different message queues. Having @StreamListener conditions we can choose at every message type how that message should be handled. As an example: We receive two different types of messages, which have different header fields and values e.g. Incoming from "order" queue: Order1: { Header: {catalog:groceries} } Order2: { Header: {catalog:tools} } Incoming from "shipment" queue: Shipment1: { Header: {region:Europe} } Shipment2:

Spring Cloud Stream multiple function definitions

北城以北 提交于 2020-01-25 08:03:26
问题 Is it possible to have reactive SCS application using functional ( spring.cloud.function ) style with multiple, separate functions / bindings? All examples I have found always register only one functional bean with default bindings input, output . I would like to register multiple, each with its own bindings. Traditionally this could be done using spring-cloud-stream-reactive but it is now deprecated in favor of functional support. 回答1: Yes, it is possible in the latest snapshot and we'll be