I have set up http quarkus project using quarkus-amazon-lambda-http mvn dependency. It is working fine, but on top of that I want to add custom lambda handler for SQS events.
I have added sqs lambda handler
@Named("SqsHandler")
public class SqsHandlerLambda implements RequestHandler<InputObject, OutputObject> {
}
and added handler definition in application.properties:
quarkus.lambda.handler=SqsHandler
Whenever I try to run it: mvn quarkus:dev
it gives:
io.quarkus.builder.BuildException: Build failure: Multiple handler classes. You have a custom handler class and the AWS Lambda HTTP extension. Please remove one of them from your deployment
My idea was to use environment vairables in SAM template to deploy 2 functions, one which handle http requests, other SQS events. But is it possible to achieve what I want?
80% of the code base is the same for the Http events and SQS events, so there would be a lot of duplicate code if I do it in two separate code repositories.