Merge pull request #1172 from sobychacko/fix-partitioning-interceptor
Fix PartitioningInterceptor CCE
This commit is contained in:
@@ -419,10 +419,14 @@ public class KafkaMessageChannelBinder extends
|
||||
List<ChannelInterceptor> interceptors = ((InterceptableChannel) channel)
|
||||
.getInterceptors();
|
||||
interceptors.forEach((interceptor) -> {
|
||||
if (interceptor instanceof PartitioningInterceptor || interceptor instanceof DefaultPartitioningInterceptor) {
|
||||
if (interceptor instanceof PartitioningInterceptor) {
|
||||
((PartitioningInterceptor) interceptor)
|
||||
.setPartitionCount(partitions.size());
|
||||
}
|
||||
else if (interceptor instanceof DefaultPartitioningInterceptor) {
|
||||
((DefaultPartitioningInterceptor) interceptor)
|
||||
.setPartitionCount(partitions.size());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user