Skip to content

GH-2437: Fix Fatal When No Matching RabbitHandler #2443

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

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

garyrussell
Copy link
Contributor

Resolves #2437

Failure to find a @RabbitHandler method for the payload must be treated as a fatal exception to avoid an infinite loop.

Also, fix CREH cause traversal to stop when any fatal exception is found. Previously, traversal only stopped for the original subset of exceptions.

cherry-pick to 2.4.x

Resolves spring-projects#2437

Failure to find a `@RabbitHandler` method for the payload must be treated
as a fatal exception to avoid an infinite loop.

Also, fix CREH cause traversal to stop when **any** fatal exception is found.
Previously, traversal only stopped for the original subset of exceptions.

**cherry-pick to 2.4.x**
@garyrussell
Copy link
Contributor Author

Also tested with

@SpringBootApplication
public class Rgh2437Application {

	public static void main(String[] args) {
		SpringApplication.run(Rgh2437Application.class, args);
	}

	@Bean
	ApplicationRunner runner(RabbitTemplate template) {
		return args -> {
			template.convertAndSend("", "foo", "test");
		};
	}

}

@Component
@RabbitListener(queues = "foo")
class Listener {

	@RabbitHandler
	void listen(Integer in) {
	}

}

@artembilan artembilan merged commit 976b3df into spring-projects:main Mar 24, 2023
@artembilan
Copy link
Member

... and cherry-picked to 2.4.x

@garyrussell garyrussell deleted the GH-2437 branch March 27, 2023 14:00
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

Successfully merging this pull request may close these issues.

Missing @RabbitHandler method triggers an infinite retry loop
2 participants