-
Notifications
You must be signed in to change notification settings - Fork 90
Unable to use SQS Large Message Handling with Gradle #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @msailes @pankajagrawal16 @jeromevdl could take a look into this, please? |
Hi @andavies , Apologies for delay in response. I have been out sick but now recovering. I pushed a sample gradle repo which is using SQS module as well. It is using java 11 and gradle 6. This is how my build.gradle looks. Let me know if this helps to get things working for you? An easy way to start with initial setup is to use Quick hello world examples using SAM CLI mentioned here. I basically started with this in the sample repo above and then added sqs module specific dependencies. If use of annotation For the documentation, install steps are mentioned here but maybe we can make it more explicit somehow. Let me know if this solves your issues and feel free to update the issue accordingly. |
Hi @andavies , Hope this works for you now? |
Hi @andavies, Did you get around testing it again? |
Hi, thanks for this. I haven't tested it yet as I ended up writing my own
solution and moving on, but I will test this tomorrow morning.
…On Mon, 31 May 2021, 13:37 Pankaj Agrawal, ***@***.***> wrote:
Hi @andavies <https://github.com/andavies>,
Did you get around testing it again?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADY2U7W4NBOTHQ4V4DF5CLDTQN7HJANCNFSM43BYDROQ>
.
|
Ok so I took the following from your build.gradle and put it into my own...
and I get the error Thank you for your help - I'm sure there's a fix to this error as well, but honestly it's just not worth me spending any more time trying to fix it - I made a little workaround that avoids having to use powertools. Feel free to close the issue and thanks again. |
Ok thanks for the feedback. I will close this issue for now. |
I have an AWS Lambda function that receives an SQSEvent. I need to enable support for large messages that are stored in S3.
I'm following the instructions here: https://awslabs.github.io/aws-lambda-powertools-java/utilities/sqs_large_message_handling/
I'm using Gradle, so I add this to my build.gradle as described:
dependencies { ... implementation 'software.amazon.lambda:powertools-sqs:1.5.0' aspectpath 'software.amazon.lambda:powertools-sqs:1.5.0' }
Error: Could not find method aspectpath() for arguments [software.amazon.lambda:powertools-sqs:1.5.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
.Ok so I gather I need to add the AspectJ plugin, like in the Maven example (although not mentioned in the Gradle example).
In the Maven example you use the one by org.codehaus.mojo, but there doesn't seem to be an equivalent for Gradle. This one seems like the official plugin for Gradle - https://plugins.gradle.org/plugin/aspectj.gradle - so I use that.
plugins { id "aspectj.gradle" version "0.1.6" }
Error: You must set the property 'aspectjVersion' before applying the aspectj plugin
Stack Overflow https://stackoverflow.com/questions/55753896/gradle-error-you-must-set-the-property-aspectjversion-before-applying-the-as tells me to define the version in gradle.properties so I do that
Error: java.lang.IllegalStateException: Unnecessarily replacing a task that does not exist is not supported. Use create() or register() directly instead.
Google leads me to this issue #146
I'm using Gradle 6, and I can't drop to Gradle 5 in my workplace. So like the issue says I use a different AspectJ plugin: https://plugins.gradle.org/plugin/aspectj.AspectjGradlePlugin.
It now builds. I run my tests...
Error: Task :compileAspect warning You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
That's this issue: projectlombok/lombok#2592. So I add the workaround to my build process options:
-Djps.track.ap.dependencies=false
I run the tests again.
`Unable to find method ''org.gradle.internal.deprecation.DeprecationMessageBuilder$DeprecateProperty$WithDeprecationTimeline org.gradle.internal.deprecation.DeprecationMessageBuilder$DeprecateProperty.willBeRemovedInGradle8()''
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes`
At this point I'm seriously considering my career choices. I restart my IDE and kill all Java processes. I reimport my dependencies. Same error. This time I click on:
Re-download dependencies and sync project (requires network)
Same error. I click on
Stop Gradle build processes (requires restart)
Same error.
I'm out of options. I've lost a whole day to this.
Please can you tell me how I can use SQS Large Message Handling using Gradle, and provide working instructions on your documentation. OR - is there an alternative way I can receive large SQS messages (that are offloaded to S3) in my lambda function?
The text was updated successfully, but these errors were encountered: