How we create stsURI for athentication in Azure - azure

I want to push Message in the queue using Azure Service Bus
I go through with lots of solutions but I found most of them are done by using Connection string of the Service Bus with SharedAccessKeyName and Value
but I want to achieve the same using sts uri
I tried with Get-SBClientConfiguration command also on power-shell to get stsuri
How we get stsuri for azure service bus authentication

Related

Running Azure Service Bus Locally [duplicate]

This question already has answers here:
Test Azure Service Bus locally without any subscription or login
(2 answers)
Closed 4 months ago.
By any means is there anyway we can try Azure Service Bus on Local Machine to send/receive messages without any Azure Subscription?
I meant like Postgres which can be installed on PC and try CRUD operations from C# code , in the similar way for Azure Service Bus.
In 6 April 2021 #jimmy-bogard said:
For teams new to Azure Service Bus, one of the first questions you have to answer is "how do I develop against this?" And it turns out the answer isn't that straightforward - because it's currently impossible to run Azure Service Bus outside of Azure. There's no install. There's no Docker image. There's no emulator.
I don't think something changed from that time. In my project we use RabbitMQ for local development. And than use Azure Service Bus in deployed services

How do I run an Azure Service Bus Topics subscriber app 24/7 in Azure?

There is an example here that explains on how to send messages and receive messages using Azure Service Bus through a publisher and subscriber application.
My questions are about the subscriber application that receives messages:
Does registering in the application a message handler with subscriptionClient.RegisterMessageHandler(ProcessMessagesAsync, messageHandlerOptions); process the messages 24/7 until the application is shut down?
Can I deploy the subscriber console app in Azure only through Docker Container? If I don't want to use containers, what is the other hosting option I have? I have done CI/CD pipeline to host a WebAPI in Azure App Services from Visual Studio 2019 before.
Does registering in the application a message handler with subscriptionClient.RegisterMessageHandler(ProcessMessagesAsync, messageHandlerOptions); process the messages 24/7 until the application is shut down?
That's correct. That API is intended for the continuous flow of messages that needs to be processed.
Can I deploy the subscriber console app in Azure only through Docker Container? If I don't want to use containers, what is the other hosting option I have?
You can host continuously running Azure Service Bus processing using the following options:
Virtual Machine(s)
AKS/ACI
Service Fabric
Azure WebJobs (requires a WebApp)
An alternative option would be to look into Azure Functions. While it doesn't run 24/7, it allows a reactive type of application.

Stop/Start Azure Cloud Service

In order to automate a process in my cloud deployment, I need to stop and start a cloud service (that archives data) very often through code. Currently, I stop and start that cloud service manually using the Azure Management Portal. I want this to be done through my another cloud service that processes the input data.
The azure cloud service that I am trying to stop and start has one deployment (PRODUCTION).
There is only limited information available in google on how to do this.
I tried the following MSDN website(Azure REST API) to toggle the deployment status between "Running" and "Suspended", but, I am getting a "Bad Request" error when I implement exactly as described in this website (MSDN does not allow me to post the website details).
Can any one of you point me to the right direction on how to stop/start azure cloud service through code?
Is this Virtual Machine? If yes, then use REST API/Powershell should do the trick
Start VM using REST API
Stop VM using REST API

Service Bus 1.0 Can't Create Queue or Topic

I've installed Service Bus for Windows Server on Server 2012. I'm trying to use the "Service Bus Explorer" management GUI to manage queues/topics.
I'm connecting to my service namespace by using the endpoint connection generated by the following PowerShell command:
Get-SBClientConfiguration -Namespaces 'MyNamespace' -Verbose;
Which generates:
Endpoint=sb://MyMachine/MyNamespace;StsEndpoint=https://MyMachine:9355/MyNamespace;RuntimePort=9354;ManagementPort=9355
And I am able to connect successfully.
PROBLEM:
In the Service Bus Explorer GUI, when I try to create a queue or topic, I get the following error in the Log output:
Exception: Object reference not set to an instance of an object.
Is there something I'm missing? I've gone through every Service Bus 1.0 setup guide I could find and everything seems to be in order with my installation.
I'm the author of the tool. In December I came across a similar problem:
If you GAC the Windows Azure Service Bus version of the Microsoft.ServiceBus.dll v.1.8:
The Service Bus Gateway and Service Bus Message Broker Windows services of Service Bus 1.0 for Windows Server start correctly, but they load the cloud dll instead of the on-premises one.
Any client application running on the same machine loads the cloud version of the dll.
If a client application connects to a local, on-premises SB namespace, The NamespaceManager and MessagingFactory get created correctly.
namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);
MessagingFactory = MessagingFactory.CreateFromConnectionString(connectionString);
The NamespaceManager object can bed used to create and delete entities (e.g. queues)
Instead, if the application tries to send or receive a message to/from a local queue with a MessageSender or MessageReceiver object created starting from the MessagingFactory, the operation fails and an exception (with 50002 error number) is catched by the application.
After removing the Windows Azure Service Bus Microsoft.ServiceBus.dll v.1.8 from the GAC and after restarting the Service Bus Gateway and Service Bus Message Broker Windows services, the problem disappears.
The client application is able to send and receive messages to/from a local queue linking both the cloud and on-premises dlls.
In a nutshell, if you GAC the cloud version of the dll, the Service Bus Gateway and Service Bus Message Broker Windows services start correctly, you can create messaging entities, but you get errors when an app tries to send/receive messages.
Questions:
Did you GACed the Windows Azure version of the dll?
What version of the Service Bus Explorer are you using (see the about form)?

azure servicebus how to do incremental production deployment

I'd like to know what is the best practice for doing incremental production deployment in azure with servicebus,
How to ensure that the messages don't get deleted when deploying a new version
Is there a backup mechanism to save the messages and load it back after the deployment is complete?
The Windows Azure Service Bus is a service which runs outside of your deployment, similar to Windows Azure SQL Database or Windows Azure Storage. This means that it does not depend on your deployment: you can deploy, remove, re-deploy your application without impacting the messages present in the Service Bus.
The only thing you'll need to take care of when you deploy a new version of your application is that the messages available in Service Bus Queues / Subscriptions might have been sent by the old version of the application. So take into account that the new version of your application will need to be compatible with these "old" message formats.

Resources