@@ -1021,7 +1021,7 @@ synchronized void add(
10211021 // TODO consider using/emulating ConsumerUpdateListener, to have only one API, not 2
10221022 // even when the consumer is not a SAC.
10231023 SubscriptionContext subscriptionContext =
1024- new DefaultSubscriptionContext (offsetSpecification );
1024+ new DefaultSubscriptionContext (offsetSpecification , subscriptionTracker . stream );
10251025 subscriptionTracker .subscriptionListener .preSubscribe (subscriptionContext );
10261026 LOGGER .info (
10271027 "Computed offset specification {}, offset specification used after subscription listener {}" ,
@@ -1217,9 +1217,12 @@ public int hashCode() {
12171217 private static final class DefaultSubscriptionContext implements SubscriptionContext {
12181218
12191219 private volatile OffsetSpecification offsetSpecification ;
1220+ private final String name ;
12201221
1221- private DefaultSubscriptionContext (OffsetSpecification computedOffsetSpecification ) {
1222+ private DefaultSubscriptionContext (
1223+ OffsetSpecification computedOffsetSpecification , String name ) {
12221224 this .offsetSpecification = computedOffsetSpecification ;
1225+ this .name = name ;
12231226 }
12241227
12251228 @ Override
@@ -1232,6 +1235,11 @@ public void offsetSpecification(OffsetSpecification offsetSpecification) {
12321235 this .offsetSpecification = offsetSpecification ;
12331236 }
12341237
1238+ @ Override
1239+ public String stream () {
1240+ return this .name ;
1241+ }
1242+
12351243 @ Override
12361244 public String toString () {
12371245 return "SubscriptionContext{" + "offsetSpecification=" + offsetSpecification + '}' ;
0 commit comments