File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 88using System . Threading ;
99using System . Threading . Tasks ;
1010using Azure . Messaging . EventHubs ;
11+ using Azure . Messaging . EventHubs . Consumer ;
1112using Azure . Messaging . EventHubs . Processor ;
13+ using Azure . Messaging . EventHubs . Producer ;
1214using Azure . Storage . Blobs ;
1315using Microsoft . Extensions . Azure ;
1416using Microsoft . Extensions . Configuration ;
@@ -60,9 +62,7 @@ public async Task StartAsync(CancellationToken cancellationToken)
6062
6163 private async Task ProcessEvent ( ProcessEventArgs eventArgs )
6264 {
63- // Note there is a bug with the HasEvent property in Preview 6, so check if Data is not null as work around.
64- // https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample08_EventProcessingHeartbeat.cs#L85
65- if ( eventArgs . Data != null )
65+ if ( eventArgs . HasEvent )
6666 {
6767 var totalCount = 0 ;
6868 var cancellationToken = _cancellationTokenSource . Token ;
Original file line number Diff line number Diff line change 44using System . Text ;
55using System . Threading . Tasks ;
66using Azure . Messaging . EventHubs ;
7+ using Azure . Messaging . EventHubs . Producer ;
78using Azure . Storage . Blobs ;
89using Microsoft . AspNetCore . Mvc ;
910using Microsoft . Extensions . Azure ;
Original file line number Diff line number Diff line change 44 <UserSecretsId >67ca5d37-051b-4ab1-b013-c74a2d4edb76</UserSecretsId >
55 </PropertyGroup >
66 <ItemGroup >
7- <PackageReference Include =" Azure.Messaging.EventHubs" Version =" 5.0.0-preview.6 " />
8- <PackageReference Include =" Azure.Messaging.EventHubs.Processor" Version =" 5.0.0-preview.6 " />
9- <PackageReference Include =" Azure.Storage.Blobs" Version =" 12.1 .0" />
10- <PackageReference Include =" Microsoft.ApplicationInsights.AspNetCore" Version =" 2.12 .0" />
7+ <PackageReference Include =" Azure.Messaging.EventHubs" Version =" 5.2.0 " />
8+ <PackageReference Include =" Azure.Messaging.EventHubs.Processor" Version =" 5.2.0 " />
9+ <PackageReference Include =" Azure.Storage.Blobs" Version =" 12.6 .0" />
10+ <PackageReference Include =" Microsoft.ApplicationInsights.AspNetCore" Version =" 2.15 .0" />
1111 <PackageReference Include =" Microsoft.Extensions.Azure" Version =" 1.0.0" />
1212 </ItemGroup >
1313 <ItemGroup >
You can’t perform that action at this time.
0 commit comments