Skip to content

Consumer offsets after restarting  #102

@alifirat

Description

@alifirat

Hi,

I'm using your tool to make some unit test on Kafka. I wrote a test in which I want to assert that if I restart Kafka, a consumer with the same group id retrieves last committed offset. Below my test scenario :

  1. Dataset in the test is 99 elements to publish in one topic kafka and 9 elements to publish in another topic.
  2. Kafka configuration is to have 4 partitions per topic
  3. EmbeddedKafka.start()
  4. Publish DataSet
  5. Check offsets : must be 99 for one topic, 9 for another one (tests are OK)
  6. Stop Kafka : EmbeddedKafka.stop()
  7. Wait 5 seconds.
  8. Restart kafka with EmbeddedKafka.start()
  9. Check last committed for each topic : must be always 99 for one topic, 9 for another one (tests failed)

My issue start here : when stopping the EmbeddedKafka with function stop, it seems that everything is cleaned, included offsets of a group id. My question here is to know if I can produce a such scenario with Embedded Kafka or I'm missing something in the Kafka broker configuration ?

Note that I'm using the version 0.14.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions