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

SQSMessageConsumerPrefetch keeps fetching messages after stop #238

Open
XakepSDK opened this issue May 29, 2024 · 0 comments
Open

SQSMessageConsumerPrefetch keeps fetching messages after stop #238

XakepSDK opened this issue May 29, 2024 · 0 comments

Comments

@XakepSDK
Copy link

XakepSDK commented May 29, 2024

  1. We have TestA: this test sends the message in the testAQueue, and checks some response after it was processed
  2. We have TestB: this test invokes http endpoint and waits for the message in the testAQueue

When we run TestA, we start JMS Listener for the testAQueue. After the test, we stop the listener
When we run TestB, sometimes message in the testAQueue does not appear immediately, but appears after WAIT_TIME_SECONDS
Both tests should run one after another.

After some debugging, it appears that SQSMessageConsumerPrefetch tries to fetch the message even when running = false
I've put a non-suspending breakpoint here: https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/master/src/main/java/com/amazon/sqs/javamessaging/SQSMessageConsumerPrefetch.java#L261
to print the state of the running flag. When the error I've described is hit, the flag running is in false state.

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