Closed PauloSRH closed 2 years ago
When sending as a input to the Orchestrator function an ServiceBusReceivedMessage object the deserialization fails with the following code:
namespace Functions.ExampleFunction { using System.Threading.Tasks; using Azure.Messaging.ServiceBus; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.DurableTask; public class ExampleFunction { [FunctionName(nameof(ExampleFunction))] public async Task Run( [ServiceBusTrigger("%ServiceBusTopicName%", "%ServiceBusSubscriptionName%", Connection = "ServiceBusConnectionString")] ServiceBusReceivedMessage serviceBusMessage, [DurableClient] IDurableOrchestrationClient starter) { await starter.StartNewAsync(nameof(ExampleOrchestratorFunction), input: serviceBusMessage); } } }
... protected async Task RunOrchestration(IDurableOrchestrationContext context) { ServiceBusReceivedMessage serviceBusMessage = context.GetInput<ServiceBusReceivedMessage>(); ... }
The received object in the RunOrchestration method appears like this:
Instead of the expected behavior
The received object should be like this:
Is this a issue in the deserialization of the class ServiceBusReceivedMessage? Or is something wrong with this code?
As this is a question pertaining to Azure Functions, we would recommend opening an issue on their repository.
Description
When sending as a input to the Orchestrator function an ServiceBusReceivedMessage object the deserialization fails with the following code:
Actual Behavior
The received object in the RunOrchestration method appears like this:
Instead of the expected behavior
Expected Behavior
The received object should be like this:
Is this a issue in the deserialization of the class ServiceBusReceivedMessage? Or is something wrong with this code?