File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed
kafka-ui-api/src/main/java/com/provectus/kafka/ui/emitter
kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 17
17
import org .apache .kafka .clients .consumer .ConsumerRecord ;
18
18
import org .apache .kafka .clients .consumer .KafkaConsumer ;
19
19
import org .apache .kafka .common .TopicPartition ;
20
+ import org .apache .kafka .common .errors .InterruptException ;
20
21
import org .apache .kafka .common .utils .Bytes ;
21
22
import reactor .core .publisher .FluxSink ;
22
23
@@ -85,6 +86,9 @@ public void accept(FluxSink<TopicMessageEventDTO> sink) {
85
86
}
86
87
sendFinishStatsAndCompleteSink (sink );
87
88
log .debug ("Polling finished" );
89
+ } catch (InterruptException kafkaInterruptException ) {
90
+ log .debug ("Polling finished due to thread interruption" );
91
+ sink .complete ();
88
92
} catch (Exception e ) {
89
93
log .error ("Error occurred while consuming records" , e );
90
94
sink .error (e );
Original file line number Diff line number Diff line change 9
9
import org .apache .kafka .clients .consumer .ConsumerRecord ;
10
10
import org .apache .kafka .clients .consumer .ConsumerRecords ;
11
11
import org .apache .kafka .clients .consumer .KafkaConsumer ;
12
+ import org .apache .kafka .common .errors .InterruptException ;
12
13
import org .apache .kafka .common .utils .Bytes ;
13
14
import reactor .core .publisher .FluxSink ;
14
15
@@ -59,6 +60,9 @@ public void accept(FluxSink<TopicMessageEventDTO> sink) {
59
60
}
60
61
sendFinishStatsAndCompleteSink (sink );
61
62
log .debug ("Polling finished" );
63
+ } catch (InterruptException kafkaInterruptException ) {
64
+ log .debug ("Polling finished due to thread interruption" );
65
+ sink .complete ();
62
66
} catch (Exception e ) {
63
67
log .error ("Error occurred while consuming records" , e );
64
68
sink .error (e );
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public void accept(FluxSink<TopicMessageEventDTO> sink) {
41
41
sink .complete ();
42
42
log .debug ("Tailing finished" );
43
43
} catch (InterruptException kafkaInterruptException ) {
44
+ log .debug ("Tailing finished due to thread interruption" );
44
45
sink .complete ();
45
46
} catch (Exception e ) {
46
47
log .error ("Error consuming {}" , consumerPosition , e );
Original file line number Diff line number Diff line change @@ -219,6 +219,15 @@ const Filters: React.FC<FiltersProps> = ({
219
219
default :
220
220
props . seekType = currentSeekType ;
221
221
}
222
+
223
+ if ( offset && currentSeekType === SeekType . OFFSET ) {
224
+ props . seekType = SeekType . OFFSET ;
225
+ }
226
+
227
+ if ( timestamp && currentSeekType === SeekType . TIMESTAMP ) {
228
+ props . seekType = SeekType . TIMESTAMP ;
229
+ }
230
+
222
231
props . seekTo = selectedPartitions . map ( ( { value } ) => {
223
232
const offsetProperty =
224
233
seekDirection === SeekDirection . FORWARD ? 'offsetMin' : 'offsetMax' ;
You can’t perform that action at this time.
0 commit comments