Closed chielpeters90 closed 3 years ago
For the time being, instead of using the Output Binding, could you try doing this with the SDK and report back? This link should have everything you need to be able to send multiple messages from within the azure function without using the output bindings!
Currently we don't have plan to support multiple service bus output message. As @ijoosong mentioned, the best bet is to use our azure-servicebus package. It provides full service bus integration. Follow the link ijoosong provided to access the example code.
For the Queue output binding it is possible to send multiple messages to the same output, see Azure Documentation. In a similar fashion I would like to be able to do the same for Service Bus Messages.
My use case is to implement an Azure Function based on a timer which scrapes some data from an API and sends multiple messages to the same service bus topic. In a very basic example my function would look like this
__init__.py
function.json
Currently this is not allowed as the
ServiceBusMessageOutConverter
only allows for astr
orbytes
type. I converted both methodsencode
andcheck_output_type_annotation
to allow for collections in a similar fashion to the Queue Binding and when I run the function locally it is able to create multiple output messages to the same binding.Is this something that can easily be added to the library (I would be willing to submit a PR) or is this approach breaking something?