Realizar 2 Services Bus de Azure que se requieren para 2 procesos
Este es un ejemplo de como consumirlo por .net
pero se requiere en PHP o escucho propuestas
.Net
using System;
using [login to view URL];
using [login to view URL];
using [login to view URL];
using [login to view URL];
using [login to view URL];
namespace ExampleReciveMessage
{
class Program
{
private const string ServiceBusConnectionString =
"Endpoint=sb://loquesea";
const string SubscriptionName = "masdeloque";
static ISubscriptionClient subscriptionClient;
static void Main(string[] args)
{
MainAsync().GetAwaiter().GetResult();
}
static async Task MainAsync()
{
var csb = new
ServiceBusConnectionStringBuilder(ServiceBusConnectionString);
subscriptionClient = new SubscriptionClient(csb, SubscriptionName);
[login to view URL]("======================================================");
[login to view URL]("Press any key to exit after receiving all the
messages.");
[login to view URL]("======================================================");
// Register Subscription's MessageHandler and receive messages in a
loop
RegisterOnMessageHandlerAndReceiveMessages();
[login to view URL]();
await [login to view URL]();
}
static void RegisterOnMessageHandlerAndReceiveMessages()
{
// Configure the MessageHandler Options in terms of exception
handling, number of concurrent messages to deliver etc.
var messageHandlerOptions = new
MessageHandlerOptions(ExceptionReceivedHandler)
{
// Maximum number of Concurrent calls to the callback
`ProcessMessagesAsync`, set to 1 for simplicity.
// Set it according to how many messages the application wants to
process in parallel.
MaxConcurrentCalls = 1,
// Indicates whether MessagePump should automatically complete
the messages after returning from User Callback.
// False below indicates the Complete will be handled by the User
Callback as in `ProcessMessagesAsync` below.
AutoComplete = false
};
// Register the function that will process messages
[login to view URL](ProcessMessagesAsync,
messageHandlerOptions);
}
static async Task ProcessMessagesAsync(Message message, CancellationToken
token)
{
// Process the message
[login to view URL]($"Received message:
SequenceNumber:{[login to view URL]}
Body:{[login to view URL]([login to view URL])}");
// Complete the message so that it is not received again.
// This can be done only if the subscriptionClient is created in
[login to view URL] mode (which is default).
await
[login to view URL]([login to view URL]);
// Note: Use the cancellationToken passed as necessary to determine
if the subscriptionClient has already been closed.
// If subscriptionClient has already been Closed, you may chose to
not call CompleteAsync() or AbandonAsync() etc. calls
// to avoid unnecessary exceptions.
}
// Use this Handler to look at the exceptions received on the MessagePump
static Task ExceptionReceivedHandler(ExceptionReceivedEventArgs
exceptionReceivedEventArgs)
{
[login to view URL]($"Message handler encountered an exception
{[login to view URL]}.");
var context = [login to view URL];
[login to view URL]("Exception context for troubleshooting:");
[login to view URL]($"- Endpoint: {[login to view URL]}");
[login to view URL]($"- Entity Path: {[login to view URL]}");
[login to view URL]($"- Executing Action: {[login to view URL]}");
return [login to view URL];
}
}
}
Hello!
Your proposal looks really interesting for me because work on this area of technologies is good challenge. I like helping you to resolve your tasks and realise your decisions for improving business using web development best practices
Last 3 years I'm working outside UpWork but I started my career on this marketplace and it allows me to stay on the edge of modern technologies and last innovations. I prefer when my customers focus on business and not on development but if the customer choose to review the code or work as lead developer on the project it's also a god way for cooperation.
There aren't any panic feelings when I see legacy code or hardcoded systems. I don't know everything and every framework but I know base principles of development and I have university fundamental engineering education so I'm not afraid something new and unknown but I like it. I have worked in teams and as independent developer.
Many projects were completed by me inside and outside UpWork. You can check feedback from my customers in my profile and find that it's always positive because I appreciate good partnership and stable communication
Thank you for taking the time to read my application.