AspNetCoreServiceBus icon indicating copy to clipboard operation
AspNetCoreServiceBus copied to clipboard

Azure Function : Write a message to Topic from function

Open arunprasathv opened this issue 5 years ago • 5 comments

Do you have a sample that writes a message to a service bus topic from azure function? reading connection string values from key vault.

arunprasathv avatar Aug 03 '20 17:08 arunprasathv

Hi @arunprasathv not public, will add something like this . You would basically do something like this:

https://damienbod.com/2020/07/20/using-key-vault-and-managed-identities-with-azure-functions/

then read the bus connection string in.

Greetings Damien

damienbod avatar Aug 04 '20 21:08 damienbod

Great, So the connection string will have only base key vault URI, and not for every secret. now i can store multiple keys. How to manage the keys between multiple environments. i want to use one KV for all non-prod. I will have separate SB for every env.

arunprasathv avatar Aug 06 '20 15:08 arunprasathv

Mine is not a durable function, can i still use startup class ? i'm using Function App.

arunprasathv avatar Aug 06 '20 16:08 arunprasathv

also i dont see anywhere in your code keyvault end point is being used. I see this line var keyVaultClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));

but not being used anywhere.

arunprasathv avatar Aug 06 '20 16:08 arunprasathv

also i want to use this in my Function which is a static class. I can't do
private readonly MyConfigurationSecrets _myConfigurationSecrets;

arunprasathv avatar Aug 06 '20 17:08 arunprasathv

updated and fixed

damienbod avatar Jun 30 '24 14:06 damienbod