How to Solve NameError: name 'OffsetResetStrategy' is not defined -- kafka

Solution: Import the 'OffsetResetStrategy' module

To Solve the error, add the following line to the top of your code.

from kafka import OffsetResetStrategy

 

For more information:
Python kafka OffsetResetStrategy