1. Write kafka_consumer.py as a standalone script 2. It listens to the 'book-updates' topic continuously 3. When it receives an event, it updates OpenSearch using your existing opensearch.py client 4. Run this script in a separate terminal window, kept running alongside your FastAPI server