Skip to content

SimpleMessageListenerContainer does not check for a NoSuchMethodException in a cause stack #3396

@artembilan

Description

@artembilan

Current logic is like:

			catch (ListenerExecutionFailedException ex) {
				// Continue to process, otherwise re-throw
				if (ex.getCause() instanceof NoSuchMethodException) {
					throw new FatalListenerExecutionException("Invalid listener", ex);
				}
			}

However, in case of @RabbitHandler we do have in the DelegatingInvocableHandler:

			handler = findHandlerForPayload(payloadClass);
			if (handler == null) {
				throw new IllegalStateException(
						new NoSuchMethodException("No listener method found in " + this.bean.getClass().getName()
								+ " for " + payloadClass));
			}

So, the listener container is not stopped for such a situation as it is intended.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions