Skip to content

Docs say defaultRetryTopicKafkaTemplate is the default template bean name. @RetryableTopic javadoc says retryTopicDefaultKafkaTemplate #3514

@ndwhelan

Description

@ndwhelan

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

Between (at least) 2.9.13 and 3.2.4

Describe the bug

The documentation states that the default KafkaTemplate bean for publishing retries / DLT through @RetryableTopic is defaultRetryTopicKafkaTemplate. The annotation states, and at least some tests use this, that it should be retryTopicDefaultKafkaTemplate. On the other hand, some tests and code refer to defaultRetryTopicKafkaTemplate through RetryTopicBeanNames.DEFAULT_KAFKA_TEMPLATE_BEAN_NAME

I don't know which one to use at this point. Though I'm working around this by specifying a specific values for the kafkaTemplate parameter on the @RetryableTopic annotation.

To Reproduce

  • Create listener annotated with @RetryableTopic
  • Create a bean named retryTopicDefaultKafkaTemplate
  • See that it's not used by the @RetryableTopic publishing.

To be honest, I'm having trouble determining which bean its using.

Expected behavior

I would expect consistency in the javadoc and the docs on the Spring Kafka website to be consistent. At this point, I don't know which one is actually used in the code.

Sample

If necessary, I will work on an isolated example in a new GitHub repository. Though, i'm hoping this issue/concern is straightforward enough, with the links above, that it's not necessary. Still, I understand if it is.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions