0

Is it possible to create a service bus subscription and register a message handler? I'm a new to durable functions and quite concerned because of orchestrator code constraints, especially with this:

Orchestrator code must never initiate any async operation except by using the DurableOrchestrationContext API

Am I right that it will be impossible to register service bus message handler because it begins a new thread to receive messages and it is awaited on every time a new message is received?

Please notice that it's not a question about the service bus trigger. Actually this orchestration function should be triggered by service bus message in the queue but it also should perform a subscription to another service bus topic.

Roman Koliada
  • 4,286
  • 2
  • 30
  • 59

1 Answers1

1

Yes. Such a message handler would be a long running function app which wouldn't work on the consumption tier.

But you can still achieve what you are trying.

Instead of a HTTP Starter function which starts an orchestration can actually be triggered by a service bus message too. Its like any other function.

And if your use case entails waiting for another message, you could use the external events which your orchestration can wait for and another service bus triggered function could raise the external event.

PramodValavala
  • 6,026
  • 1
  • 11
  • 30