Azure / Azure/Azure-Functions

Allow Object Property Binding for Queue Names

Open
#443 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

I have a POCO that looks like this:

```
class ExportEvent
{
int EventType {get; set;}
string CompanyCode {get; set;}
}
```

I am biding to an EventHub like so:
```

public async static Task Run([EventHubTrigger("%exportHubName%", Connection = "hub-export-events", ConsumerGroup = "exports")]ExportEvent exportEvent,
ExecutionContext executionContext,
ML.ILogger logger,
TraceWriter traceWriter)
```

I would like to be able to this for an out binding:

```
public async static Task Run([EventHubTrigger("%exportHubName%", Connection = "hub-export-events", ConsumerGroup = "exports")]ExportEvent exportEvent,
[Queue("export-{CompanyCode}", Connection ="exportConnection")] IAsyncCollector exportQueue,
ExecutionContext executionContext,
ML.ILogger logger,
TraceWriter traceWriter)
```
If this is fired from an Event Hub with this data:
`{ "EventType": 1, "CompanyCode": "MyCompany" }`

I should then be able to call:
`await exportQueue.AddAsync(exportEvent);`

And it would put that json on the queue "export-mycompany", and if that Queue didn't exists it would create it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.