フラット ファイルに存在するデータを VM UNIX サーバーから Azure イベント ハブに送信し、Azure BLOB ストレージに公開する必要があります。
以下のコードを使用してこれを行うことができます
val producer: EventHubProducerClient = new EventHubClientBuilder().connectionString(connectionString, eventHubName).buildProducerClient
val batch: EventDataBatch = producer.createBatch()
Reading the content of my file line by line and sending to tryAdd methos.
for (line <- fileContent.getLines)
{
batch.tryAdd(new EventData(fileLine)) }
// send the batch of events to the event hub
//producer.send(batch)
// close the producer
producer.close()
私のファイルには約1000件のレコードがあります。そのために、イベント ハブは約 12 のリクエストを作成しました (これはランダムに実行しているようです)。
イベント ハブがどのような基準で要求を作成するのかを理解しようとしていますが、それを制御する方法はありますか?
そのあたりの情報はとても参考になります