VN11111
New Contributor III

Thanks for your help! I realized what is the root cause now!

My configuration was:

conf = {}
conf["EVENT_HUB_CONN_STR"] = sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt("Endpoint=sb://***.servicebus.windows.net/;SharedAccessKeyName=xxxx;SharedAccessKey=xxxxx;EntityPath=xxxx")

It worked after I changed to below:

conf = {}
conf['eventhubs.connectionString'] = sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt("Endpoint=sb://***.servicebus.windows.net/;SharedAccessKeyName=xxxx;SharedAccessKey=xxxxx;EntityPath=xxxx")

For more supplement, I'm using below library.

com.microsoft.azure:azure-eventhubs-spark_2.12:2.3.21