[ 
https://issues.apache.org/jira/browse/KAFKA-15417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17761996#comment-17761996
 ] 

Victor van den Hoven commented on KAFKA-15417:
----------------------------------------------

Thank you for your comment.

There is unfortunately no improvement.

 

I tested it with the following:

 
 
_{color:#6a3e3e}props{color}{color:#000000}.put(StreamsConfig.InternalConfig.{color}{color:#0000c0}EMIT_INTERVAL_MS_KSTREAMS_OUTER_JOIN_SPURIOUS_RESULTS_FIX{color}{color:#000000},
 0);{color}_
 

At startup I get the following warning: 
{quote}_WARN 25120 --- [           main] o.a.k.clients.consumer.ConsumerConfig  
  : These configurations '[specific.avro.reader, schema.registry.url, 
__emit.interval.ms.kstreams.outer.join.spurious.results.fix__]' were supplied 
but are not used yet._
{quote}
 

I use the following joinwindow:

   ### JoinWindow size: 20000ms
   ### JoinWindow before: 20000ms
   ### JoinWindow after: 0ms

 

Started with empty topics:

Test1:  

streamA.leftjoin( streamB);

put message on streamA  (key1, a1)
wait 5000ms
put message on streamA (key1, a2)

expected join-record (key1, null) but there is not.

 

Started with empty topics:

Test2:  

streamA.leftjoin( streamB);

put message on streamA  (key1, a1)
wait 25000ms
put message on streamA (key1, a2)

there is a join-record (key1, null) .

 

> JoinWindow does not  seem to work properly with a KStream - KStream - 
> LeftJoin()
> --------------------------------------------------------------------------------
>
>                 Key: KAFKA-15417
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15417
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 3.4.0
>            Reporter: Victor van den Hoven
>            Priority: Major
>         Attachments: SimpleStreamTopology.java, SimpleStreamTopologyTest.java
>
>
> In Kafka-streams 3.4.0 :
> According to the javadoc of the Joinwindow:
> _There are three different window configuration supported:_
>  * _before = after = time-difference_
>  * _before = 0 and after = time-difference_
>  * _*before = time-difference and after = 0*_
>  
> However if I use a joinWindow with *before = time-difference and after = 0* 
> on a kstream-kstream-leftjoin the *after=0* part does not seem to work.
> When using _stream1.leftjoin(stream2, joinWindow)_ with 
> {_}joinWindow{_}.{_}after=0 and joinWindow.before=30s{_}, any new message on 
> stream 1 that can not be joined with any messages on stream2 should be joined 
> with a null-record after the _joinWindow.after_ has ended and a new message 
> has arrived on stream1.
> It does not.
> Only if the new message arrives after the value of _joinWindow.before_ the 
> previous message will be joined with a null-record.
>  
> Attached you can find two files with a TopologyTestDriver Unit test to 
> reproduce.
> topology:   stream1.leftjoin( stream2, joiner, joinwindow)
> joinWindow has before=5000ms and after=0
> message1(key1) ->  stream1
> after 4000ms message2(key2) -> stream1  ->  NO null-record join was made, but 
> the after period was expired.
> after 4900ms message2(key2) -> stream1  ->  NO null-record join was made, but 
> the after period was expired.
> after 5000ms message2(key2) -> stream1  ->  A null-record join was made,  
> before period was expired.
> after 6000ms message2(key2) -> stream1  ->  A null-record join was made,  
> before period was expired.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to