-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathTasks.cs
More file actions
24 lines (23 loc) · 885 Bytes
/
Tasks.cs
File metadata and controls
24 lines (23 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.Messaging.EventHubs;
using Azure.Messaging.EventHubs.Producer;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using Azure.Messaging.Replication;
namespace EventHubToEventHubCopy
{
public static class Tasks
{
[FunctionName("telemetry")]
[ExponentialBackoffRetry(-1, "00:00:05", "00:05:00")]
public static Task Telemetry(
[EventHubTrigger("telemetry", ConsumerGroup = "%telemetry-source-consumergroup%", Connection = "telemetry-source-connection")] EventData[] input,
[EventHub("telemetry-copy", Connection = "telemetry-target-connection")] EventHubProducerClient outputClient,
ILogger log)
{
return EventHubReplicationTasks.ForwardToEventHub(input, outputClient, log);
}
}
}