I am trying to write a workflow to listen serviceBustrigger using durable azure functions. But client running without orchestrator. Neither throwing any error. Can anyone tell what am i missing to enable seriveBusTrigger in durable function? Following is the client function code :
[FunctionName("UpdateGlobalRatesOnRSLs")]
public static async Task Run(
[ServiceBusTrigger("%EventMessageTopic%", "%Subscriber%", Connection = "ServiceBus")] string message,
MessageReceiver messageReceiver,
string lockToken,
[DurableClient] IDurableOrchestrationClient starter, ILogger log)
{
log.LogInformation($"message - " + message);
if (string.IsNullOrWhiteSpace(message)) await messageReceiver.DeadLetterAsync(lockToken, "Message content is empty.", "Message content is empty.");
var orchestrationInput = JsonConvert.DeserializeObject(message);
string instanceId = await starter.StartNewAsync<object>("UpdateGlobalRatesOnRSLs_OrchestrationFunction", orchestrationInput);
log.LogInformation($"Orchestration Started with ID: {instanceId}");
}
Or please share any working code sample.