question

ManikandanBalasubramanian-4265 avatar image
0 Votes"
ManikandanBalasubramanian-4265 asked ManikandanBalasubramanian-4265 edited

Azure Event Hub ProcessorClient connection is not persistent with Azure.Messaging.EventHubs in Console App

Hi Team,

I am trying to receive events from Event Hub into my application(Console App - netcoreapp3.1) and I am using EventProcessorClient as given in the example listed here:
https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-dotnet-standard-getstarted-send

I am using blob storage client and EH connection. The library I am using is:
Azure.Messaging.EventHubs.Processor(5.6,2);
Azure.Messaging.EventHubs(5.6.2)

The EH connection is able to receive first few messages and then I am seeing that PartitionClosingHandler is getting called. When I print the error message, I am seeing the reason as shutdown.

Can you please let me know how to make this connection consistent?

Thanks and Regards,
Mani

dotnet-aspnet-core-generalazure-event-hubs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered ManikandanBalasubramanian-4265 commented

Hello anonymous user ,

Thanks for the ask and using Microsoft Q&A platform .

It may be due to rebalancing. How many clients are you trying to run at the same time ? If you are running with multiple clients then you should let the clients to reach a balanced state after which you should not see PartitionClosingHandler calls.

And one more thing. I suggest better run the code with a brand new consumer group. Using default consumer group while it is already in use by other clients becomes an easy pitfall .

Please do let me know how it goes .
Thanks
Himanshu


  • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification

  • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HimanshuSinha-MSFT

Thanks for your immediate response. I am using only one client to access this data; when I am testing in my local, I use a different EH consumer group.

Is there any configuration setting that I can provide in EventProcessorClient that would make this connection persistent? Also I am trying this in the Console App.

Regards,
Mani

0 Votes 0 ·
ManikandanBalasubramanian-4265 avatar image
0 Votes"
ManikandanBalasubramanian-4265 answered

Hi @HimanshuSinha-MSFT

Thanks for your immediate response. I am using only one client to access this data; when I am testing in my local, I use a different EH consumer group.

Is there any configuration setting that I can provide in EventProcessorClient that would make this connection persistent? Also I am trying this in the Console App.

Regards,
Mani

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ManikandanBalasubramanian-4265 avatar image
0 Votes"
ManikandanBalasubramanian-4265 answered ManikandanBalasubramanian-4265 edited

Gentle bump on this issue.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.