UPDATED: Type resolution with deep generic hierarchies still fail in 2025.1.1 (regression from issue #1312)

オープン
#1,325 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker-compose, java, kafka, spring, spring-boot

調査の方向性

まず pom.xml のバージョン変更を確認してから、./mvnw spring-boot:run でデモを実行し、次に issue に記載されている productBatchListConsumer bean と GenericBatchListConsumer のシグネチャを追ってください。その batch payload を動作している consumer と比較してください。完了の条件は、既存の single-mode および batch-mode の consumer が引き続き動作しながら、raw bytes ではなく ProductCompleteDTO の値にデシリアライズされることです。

索引モデルが issue の本文から書いたものです。

説明

Description

This is a follow-up to issue #1312 ("Type resolution with deep generic hierarchies is incorrect"). After upgrading Spring Cloud BOM from 2025.0.0 to 2025.1.1 and Spring Boot to 4.0.3, type resolution issues persist in batch mode consumption.

The demo repository (ferblaca/demoStreamGenerics/tree/upgrade_to_2025_0_0) was re-tested to confirm the behavior.

Current Behavior
Single Mode - All Consumers Work ✅
  • productConsumer (GenericConsumer<ProductCompleteDTO>)
  • productConsumer2 (Consumer<ProductCompleteDTO>)
  • productMessageConsumer (GenericMessageConsumer<ProductCompleteDTO>)
  • productMessageConsumer2 (Consumer<Message<ProductCompleteDTO>>)
Batch Mode - Partial Failure ⚠️
  • productBatchListConsumer (GenericBatchListConsumer<ProductCompleteDTO>): ❌ Fails — payload arrives as byte[........]
  • productBatchListConsumer2 (Consumer<List<ProductCompleteDTO>>): ✅ Works
  • productBatchListMessageConsumer (GenericBatchMessageListConsumer<ProductCompleteDTO>): ✅ Works
  • productBatchListMessageConsumer2 (Consumer<Message<List<ProductCompleteDTO>>>): ✅ Works
Root Cause

Only the productBatchListConsumer bean with the following signature fails to deserialize correctly:

@Bean
public GenericBatchListConsumer<ProductCompleteDTO> productBatchListConsumer() {
    return new GenericBatchListConsumer<>("productBatchListConsumer");
}

Where GenericBatchListConsumer is defined as:

public class GenericBatchListConsumer<T> implements Consumer<List<T>> {
    // ...
}

Instead of deserializing to the expected type, the message payload arrives as raw bytes:

Received Batch List productBatchListConsumer Consumer: [123, 34, 105, 100, 34, 58, 49, ...]
Steps to Reproduce
  1. Clone the demo repository
  2. Update pom.xml with:
    • Spring Cloud BOM: 2025.1.1
    • Spring Boot: 4.0.3
  3. Run ./mvnw spring-boot:run (Kafka starts automatically via Docker Compose)
  4. Send the same test messages from the original issue
  5. Check the logs for the byte array payload symptom
Environment
Component Version
Spring Boot 4.0.3
Spring Cloud Stream 5.0.1
Spring Cloud Function 5.0.1
Message Broker Kafka (KRaft mode via Docker Compose)
主要言語
Java
スター
1.1k
フォーク
641
平均マージ
11時間 2分
マージ済み PR(30日)
8

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

spring-cloud/spring-cloud-function のほかの issue

spring-cloud/spring-cloud-function の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。