Add note about Kafka consumer iterator thread safety

This commit is contained in:
Nikolay Martynov 2019-05-24 16:37:27 -04:00
parent a3a325868c
commit ef94e2fb79
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ public class TracingIterable implements Iterable<ConsumerRecord> {
private final String operationName;
private final KafkaDecorator decorator;
/**
* Note: this may potentially create problems if this iterator is used from different threads.
* But at the moment we cannot do much about this.
*/
private Scope currentScope;
public TracingIterator(