Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to push a message onto azure service bus and trigger an azure function to log it sees the message

I'm experimenting with Azure and Azure Service Bus. I just want to push messages onto a queue and then have my C# azure function log that is sees the message. I'm struggling to get it working. I've created an azure account, created a resource group, created a service bus, downloaded storage explorer. I have the shared access policy 'RootManageSharedAccessKey' which has the 'managed' option checked in the portal.

So guessing what I do next? I've gone to azure functions and created a function, shown below, in the azure portal. When I open up storage explorer I'm not sure what option to use to connect to my azure instance with?

Any help? Thank you!

azure function

using System;
using System.Threading.Tasks;

public static void Run(string myQueueItem, ILogger log)
{
    log.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
}
like image 841
James Avatar asked Oct 16 '25 03:10

James


1 Answers

Using Service Bus Explorer you can connect to Azure Service Bus and administer messaging entities. You can download the tool here. enter image description here

Once you download the tool you run “ServiceBusExplorer.exe” In the Service Bus Explorer go to File Connect

Enter Connection string which you can find on in

Azure portal Dashboard --> Service Bus --> Shared access policies

enter image description here

After connected Successfully you will be able to see all the topics/queues in the connected servicebus select the Queue that you wanted Access

and then click on Send Messages as follows it will populate message box then you have to write the content of your message in required format(json, xml etc) and send it. enter image description here

like image 107
Thili Avatar answered Oct 18 '25 19:10

Thili



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!