Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Send data to Azure Functions using QueueTrigger from a Nuget package

$
0
0

I have been testing my Azure Functions using a QueueTrigger. I tested my queue by using the following code to put something on the queue.

CloudStorageAccount storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=storage.....etc");CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();CloudQueue queue = queueClient.GetQueueReference("mysecondqueue");queue.CreateIfNotExists();queue.AddMessage(new CloudQueueMessage($"Test {DateTime.Now}"));

This works fine, however what I need to do is put this code in a Nuget package. What bothers me is that I have to put the ConnectionString of my StorageAccount hard coded in that Nuget package. And this package will be used by 3rd party applications.

I could use an Azure Function with an HttpTrigger, but that kind of defeats the purpose of using a Queue.

What would be the best way to put something on a Queue from a Nuget package using a QueueTrigger, without exposing the ConnectionString of my Storage Account?

Or is my only option using a HttpTrigger in this case?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>