Skip to content

Type resolution with deep generic hierarchies still fail in 2025.0.1 (regression from issue #1312) #1325

@ferblaca

Description

@ferblaca

Describe the bug

I cannot reopen #1312 (“Type resolution with deep generic hierarchies is incorrect”), so I’m opening a new issue referencing it. Re-tested the same demo repo (ferblaca/demoStreamGenerics/tree/upgrade_to_2025_0_0) after upgrading Spring Cloud BOM from 2025.0.0 to 2025.0.1. The concrete generic consumer beans that previously failed still fail, but with different symptoms.

Single Mode Behavior

  • productConsumer (GenericConsumer<ProductCompleteDTO>): ✅ Works
  • productConsumer2 (Consumer<ProductCompleteDTO>): ✅ Works
  • productMessageConsumer (GenericMessageConsumer<ProductCompleteDTO>): ❌ Still fails; payload not deserialized (raw byte[] in GenericMessage)
  • productMessageConsumer2 (Consumer<Message<ProductCompleteDTO>>): ✅ Works

Batch Mode Behavior

  • productBatchListConsumer (GenericBatchListConsumer<ProductCompleteDTO>): ❌ Still fails; payload arrives as byte[]
  • productBatchListConsumer2 (Consumer<List<ProductCompleteDTO>>): ✅ Works
  • productBatchListMessageConsumer (GenericBatchMessageListConsumer<ProductCompleteDTO>): ❌ Still fails; receives empty list
  • productBatchListMessageConsumer2 (Consumer<Message<List<ProductCompleteDTO>>>): ✅ Works

Sample Logs (failing cases)

  • Single mode raw payload:
    Received Message productMessageConsumer Consumer: GenericMessage [payload=byte[101], headers={...}]
    
  • Batch mode raw payload:
    Received Batch List productBatchListConsumer Consumer: [123, 34, 105, 100, 34, 58, 49, ...]
    
  • Batch mode empty list:
    Received Batch Message List productBatchListMessageConsumer Consumer: []
    

To Reproduce

  1. Clone the demo repo above.
  2. Set Spring Cloud BOM to 2025.0.1 in pom.xml.
  3. ./mvnw spring-boot:run (Kafka starts via Docker Compose).
  4. Send the same test messages as in the original issue; check logs for the symptoms above.

Environment

  • Spring Boot 3.5.7
  • Spring Cloud 2025.0.1 (was 2025.0.0)
  • Kafka (KRaft) via provided Docker Compose
  • Demo repo above; steps identical to the original issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions