You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rate limit number of messages while writing Spark DataFrame to kafka topic #97
My DataFrame is static and has 500k records. The above script is dumping all the records to the topic at once. I want a rate limiter where in 10 seconds only 20k messages should be written to the topic. So each batch ingestion should wait at least 10 seconds after writing messages to the topic.
One approach is to divide the DataFrame in chunks and dump in batches with a sleep time of 10 seconds. I need an alternative approach which should be config driven and i do not have to slice my data. Is there a way we can ingest the data in batches with some waiting time?
Activity