c# - How to use a ServiceBus Trigger with a topic/subscription in an Azure Function -
i'd create azure function triggered when new message added topic/subscription.
for moment i've created azure function using servicebusqueuetrigger c# template , i've set queue name to
topicpath + "/subscriptions/" + subscriptionname
but i've got exception:
microsoft.servicebus: cannot entity 'topic-test/subscriptions/subscription-test' because not of type queuedescription. check using method(s) correct entity type. system.runtime.serialization: error in line 1 position 1762. expecting element 'queuedescription' namespace 'http://schemas.microsoft.com/netservices/2010/10/servicebus/connect'.. encountered 'none' name '', namespace ''. .
i thought azure function using messagingfactory.createmessagereceiver initialize message pump not.
is there support topic/subscription moment ?
yes topics supported, our ui , templates behind on unfortunately - we'll releasing updates addressing these issues.
for now, can use advanced editor edit trigger binding directly. there can specify subscriptionname
, topicname
values. here's example:
{ "bindings": [ { "type": "servicebustrigger", "name": "message", "direction": "in", "subscriptionname": "subscription-test", "topicname": "topic-test", } ] }
in general, since azure functions build atop webjobs sdk, our various bindings mapped directly sdk counterparts. example servicebustrigger
maps servicebustriggerattribute has subscriptionname
/topicname
properties. therefore, expect see same properties in function metadata model.
Comments
Post a Comment