@@ -1021,7 +1021,7 @@ synchronized void add(
1021
1021
// TODO consider using/emulating ConsumerUpdateListener, to have only one API, not 2
1022
1022
// even when the consumer is not a SAC.
1023
1023
SubscriptionContext subscriptionContext =
1024
- new DefaultSubscriptionContext (offsetSpecification );
1024
+ new DefaultSubscriptionContext (offsetSpecification , subscriptionTracker . stream );
1025
1025
subscriptionTracker .subscriptionListener .preSubscribe (subscriptionContext );
1026
1026
LOGGER .info (
1027
1027
"Computed offset specification {}, offset specification used after subscription listener {}" ,
@@ -1217,9 +1217,12 @@ public int hashCode() {
1217
1217
private static final class DefaultSubscriptionContext implements SubscriptionContext {
1218
1218
1219
1219
private volatile OffsetSpecification offsetSpecification ;
1220
+ private final String name ;
1220
1221
1221
- private DefaultSubscriptionContext (OffsetSpecification computedOffsetSpecification ) {
1222
+ private DefaultSubscriptionContext (
1223
+ OffsetSpecification computedOffsetSpecification , String name ) {
1222
1224
this .offsetSpecification = computedOffsetSpecification ;
1225
+ this .name = name ;
1223
1226
}
1224
1227
1225
1228
@ Override
@@ -1232,6 +1235,11 @@ public void offsetSpecification(OffsetSpecification offsetSpecification) {
1232
1235
this .offsetSpecification = offsetSpecification ;
1233
1236
}
1234
1237
1238
+ @ Override
1239
+ public String stream () {
1240
+ return this .name ;
1241
+ }
1242
+
1235
1243
@ Override
1236
1244
public String toString () {
1237
1245
return "SubscriptionContext{" + "offsetSpecification=" + offsetSpecification + '}' ;
0 commit comments