0

I am facing problems at the time of receiving event data in continuous web-job.

I am sending messages using batch async method of device client. At web-job, I am receiving those batches one after another. when first first batch comes, till the time of completion of all messages in it; next batch does not trigger and get executes. after first batch execution get completes, then only second batch triggers and start its execution.

I want it to perform in parallel.

I am using event processor host at receiver side, device client at sender side.

Am I missing any configuration option? like in queue, there is an option called batch size, which is used to define how many messages to process in parallel. so, is there any option in continuous web-job, which is receiving event hub data in batches and to run those many batches in parallel?

Priyanka Mane
  • 517
  • 2
  • 9
  • 23

1 Answers1

0

I got the answer after checking my code line by line. I was missing one parameter at the time of calling constructor of EventProcessorHost: leaseContainerName.

solution is to use this:

public EventProcessorHost(string hostName, string eventHubPath, string consumerGroupName, string eventHubConnectionString, string storageConnectionString, string leaseContainerName, string leaseBlobPrefix = null);

previously I was using this:

public EventProcessorHost(string hostName, string eventHubPath, string consumerGroupName, string eventHubConnectionString, string storageConnectionString);

for reference check this link: https://developers.de/blogs/damir_dobric/archive/2016/09/12/how-to-configure-eventprocessorhost-for-iothub.aspx

Priyanka Mane
  • 517
  • 2
  • 9
  • 23