Skip to content

AbstractPollingMessageSource doesn't clear pollingFutures on poll errors #1453

Description

@dzmitry-dulko

Component:
"SQS"

Description
I found out that if poll in AbstractPollingMessageSource in package io.awspring.cloud.sqs.listener.source;
failed for some reason it will keep adding CompletableFutures in pollingFutures and not clearing it as supposed to

private <F> CompletableFuture<F> managePollingFuture(CompletableFuture<F> pollingFuture) {
		this.pollingFutures.add(pollingFuture);
		pollingFuture.thenRun(() -> this.pollingFutures.remove(pollingFuture));
		return pollingFuture;
	}

in theRun(...) description

Returns a new CompletionStage that, when this stage completes normally, executes the given action.

And it leads to uncleared resources which lead me to OOM. Is that suppose to be?

Sample
In my case it was 400 and 403 (expired credentials probably) responses from AWS

Please advise on this

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: sqsSQS integration related issuetype: bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions