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

Apurva Mehta commented on KAFKA-5825:
-------------------------------------

I looked at the test log that was shared. It is conclusive that a transactional 
record was written and committed. It seems that the streams app was reading in 
{{READ_UNCOMMITTED}} mode when exactly once was set. It also fetched 2 records 
from the topic, per the log, since the position of the consumer at the end was 
2. 

It would help to share the actual data in my-topic-0 to validate that it 
actually has a message with the desired key and value, and with the 
transactional bit set. It should also have the commit record. It would also 
help to run a regular (non-streams) read-committed consumer on this log, to see 
if the message is actually returned.

If the stock producer/consumer is working as expected, then we can isolate the 
problem to the streams code, and it would help debug. 

> Streams not processing when exactly once is set
> -----------------------------------------------
>
>                 Key: KAFKA-5825
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5825
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 0.11.0.0
>         Environment: EmbeddedKafka running on Windows.  Relevant files 
> attached.
>            Reporter: Ryan Worsley
>         Attachments: build.sbt, log4j.properties, log-output.txt, Tests.scala
>
>
> +Set-up+
> I'm using [EmbeddedKafka|https://github.com/manub/scalatest-embedded-kafka/] 
> for ScalaTest.
> This spins up a single broker internally on a random port.
> I've written two tests - the first without transactions, the second with.  
> They're nearly identical apart from the config and the transactional 
> semantics.  I've written the transactional version based on Neha's 
> [blog|https://www.confluent.io/blog/exactly-once-semantics-are-possible-heres-how-apache-kafka-does-it/]
>  which is the closest thing I could find to instructions.
> The tests wait until a single message is processed by the streams topology, 
> they use this message to complete a promise that the test is waiting on.  
> Once the promise completes the test verifies the value of the promise as 
> being the expected value of the message.
> +Observed behaviour+
> The first test passes fine, the second test times out, the stream processor 
> never seems to read the transactional message.
> +Notes+
> I've attached my build.sbt, log4j.properties and my Tests.scala file in order 
> to make it as easy as possible for someone to re-create.  I'm running on 
> Windows and using Scala as this reflects my workplace.  I completely expect 
> there to be some configuration issue that's causing this, but am unable to 
> proceed at this time.
> Related information: 
> https://github.com/manub/scalatest-embedded-kafka/issues/82



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to