I am using tokenprovider approach to created new eventhub object.
tokenProvider, err := aad.NewJWTProvider(aad.JWTProviderWithEnvironmentVars())cred, err := storageLeaser.NewAADSASCredential( azurehubevent.SubscriptionID, azurehubevent.ResourceGroupName, storageAccountName, w.StorageBlobName, storageLeaser.AADSASCredentialWithEnvironmentVars())leaserCheckpointer, err := storage.NewStorageLeaserCheckpointer(cred, storageAccountName, w.StorageBlobName, azureEnv)// Starting New Connection processor, err := eph.New( ctx, eventhubconnstring, eventhubinstanceName, tokenProvider, leaserCheckpointer, leaserCheckpointer, eventProcessorHostOption...)err = processor.Start(ctx)
I am able to connect to event hub and fetch activity logs out of it. But seems most of the logs are related to "Returns Storage Account SAS Token". This is due to the very frequent call going from my application to refresh token.
Is there any way to reduce the number of refresh token calls?
Note : I saw dotnet version have one parameter called tokenTimeToLive to specify how long token is valid.
Expected Behavior
Actual Behavior
I am using tokenprovider approach to created new eventhub object.
tokenProvider, err := aad.NewJWTProvider(aad.JWTProviderWithEnvironmentVars())
cred, err := storageLeaser.NewAADSASCredential( azurehubevent.SubscriptionID, azurehubevent.ResourceGroupName, storageAccountName, w.StorageBlobName, storageLeaser.AADSASCredentialWithEnvironmentVars())
leaserCheckpointer, err := storage.NewStorageLeaserCheckpointer(cred, storageAccountName, w.StorageBlobName, azureEnv)
// Starting New Connection processor, err := eph.New( ctx, eventhubconnstring, eventhubinstanceName, tokenProvider, leaserCheckpointer, leaserCheckpointer, eventProcessorHostOption...)
err = processor.Start(ctx)
I am able to connect to event hub and fetch activity logs out of it. But seems most of the logs are related to "Returns Storage Account SAS Token". This is due to the very frequent call going from my application to refresh token.
Is there any way to reduce the number of refresh token calls?
Note : I saw dotnet version have one parameter called
tokenTimeToLive
to specify how long token is valid.Environment