Skip to content
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

Unexpected exception during execution of AmazonSQSRequester sendMessageAndGetResponse #78

Open
jf-bclc opened this issue Dec 30, 2022 · 0 comments

Comments

@jf-bclc
Copy link

jf-bclc commented Dec 30, 2022

I have setup 2 java components.

The first with an AmazonSQSRequester to invoke the sendMessageAndGetResponse method.
The seconds component with an SQSMessageConsumer and AmazonSQSResponder to invoke the sendResponseMessage method.

I am using amazon-sqs-java-temporary-queues-client version 2.0.0

It generally seems to work and I can send a message a get a response back however there is a background thread that throws runtime exceptions kind of randomly. They are all having some kind of issue performing a base64 decode. The sendMessageAndGetResponse method always completes without exception and I receive the expected responses but these runtime exceptions noted below happen most of the time however not all of the time and are not trappable with the surrounding try/catch. I've attached a file with code fragments which setup my sqsRequester and the method to send the message.

codefragments.txt

For example:
ERROR 36420 --- [nsumer-Thread-1] c.a.services.sqs.util.SQSQueueUtils : Unexpected exception

java.lang.RuntimeException: Exception encountered while processing message with ID 2d10d2c9-9b28-46ea-b4fb-758dd9dffc5c
at com.amazonaws.services.sqs.util.SQSMessageConsumer.handleMessage(SQSMessageConsumer.java:158) ~[amazon-sqs-java-temporary-queues-client-2.0.0.jar:na]
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:na]
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654) ~[na:na]
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[na:na]
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[na:na]
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) ~[na:na]
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[na:na]
at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408) ~[na:na]
at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736) ~[na:na]
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[na:na]
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[na:na]
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[na:na]
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[na:na]
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:661) ~[na:na]
at com.amazonaws.services.sqs.util.SQSMessageConsumer.poll(SQSMessageConsumer.java:122) ~[amazon-sqs-java-temporary-queues-client-2.0.0.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: java.lang.IllegalArgumentException: Last unit does not have enough valid bits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant