I'm trying to send data from one topic in Kafka to another using Faust. If the value in the original topic is None (the message is a tombstone), I'm sending the current key with a None value to the target topic.
async def order_delete(key, target_topic):
await target_topic.send(key=key, value=None, headers={'__op': b'd'})
@app.agent(topic)
async def order_info(orders):
async for key, order in orders.items():
if order is None:
for target_topic in target_topics.values():
await order_delete(key, target_topic)
continue
I expect it to be a tombstone in the target topic, but it's not. It has a delete header and the value of:
"ERROR":{ "message":"src property must be a valid json object" }
I'm new to Faust so I'm probably missing something... Is there a way to send tombstones with it?