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

traceId is changing when event is retried. #3152

Closed
mkoralewski opened this issue Mar 22, 2024 · 1 comment
Closed

traceId is changing when event is retried. #3152

mkoralewski opened this issue Mar 22, 2024 · 1 comment

Comments

@mkoralewski
Copy link

mkoralewski commented Mar 22, 2024

In what version(s) of Spring for Apache Kafka are you seeing this issue?

3.1.3

In 3.1.2 works fine

Describe the bug

We use @RetryableTopic. When we have spring-kafka 3.1.2 and event is retried it has the same traceId.
After upgrading to spring-kafka 3.1.3 traceId is changing in each retry.

To Reproduce

Send event to @RetryableTopic that will cause some exception and will be retried.

Expected behavior

Retried event should have the same traceId like original one (the same behavior as in spring-kafka 3.1.2)

Sample

I'm not able to share sample now, hope that description above is enough.

@artembilan
Copy link
Member

This one is duplication of #3151 since Topic Retry logic fully relies on the mentioned DefaultErrorHandler. See ListenerContainerFactoryConfigurer for more details:

	protected CommonErrorHandler createErrorHandler(DeadLetterPublishingRecoverer deadLetterPublishingRecoverer) {
		DefaultErrorHandler errorHandler = createDefaultErrorHandlerInstance(deadLetterPublishingRecoverer);
		errorHandler.defaultFalse(this.retainStandardFatal);
		errorHandler.setCommitRecovered(true);
		errorHandler.setLogLevel(KafkaException.Level.DEBUG);
		if (this.blockingExceptionTypes != null) {
			errorHandler.addRetryableExceptions(this.blockingExceptionTypes);
		}
		this.errorHandlerCustomizer.accept(errorHandler);
		return errorHandler;
	}

@artembilan artembilan closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants