Jim Speaker
Jim Speaker

Reputation: 1332

Imperative Triggers in Azure Functions?

I've read many posts re how to use Imperative input and output bindings - I get that, very cool.

However, what I have struggled to find is a way to create Imperative Triggers. I'm not sure if this is possible at this point.

What I would like to do:

What I am doing:

[EventHubTrigger("my-rapids-event-hub", Connection = "EventHub.ConnectionString", 
  ConsumerGroup = "%EventHub.ConsumerGroup%-%SlotConfigExtension%")] EventData[] events,
  [EventHub("my-river-eventhub", Connection = "EventHub.ConnectionString")] IAsyncCollector<string> outputEvents, 
  ILogger log)

The latter approach works, as it successfully concatenates the ConsumerGroup config values:

%EventHub.ConsumerGroup%-%SlotConfigExtension%

It feels a bit less than optimal, though, and I'd prefer to determine how to accomplish the first approach so I can ditch the extra Azure Powershell step in my release process.

Thanks in advance!

Upvotes: 2

Views: 214

Answers (0)

Related Questions