Closed peterhuene closed 3 months ago
From @peterhuene on February 22, 2019 3:46
The Azure Functions Event Hubs trigger binding is sending a PartitionContext as part of the trigger metadata, serialized as JSON for extension languages.
PartitionContext
However, the type has a public CancellationToken property that should probably be suppressed from JSON serialization.
CancellationToken
Here's the JSON object that is serialized for the PartitionContext:
{ "CancellationToken":{ "IsCancellationRequested":false, "CanBeCanceled":true, "WaitHandle":{ "Handle":{ "value":2040 }, "SafeWaitHandle":{ "IsInvalid":false, "IsClosed":false } } }, "ConsumerGroupName":"$Default", "EventHubPath":"test", "PartitionId":"0", "Owner":"40eeeb3a-3491-4072-ba37-59ecdc330b6e", "RuntimeInformation":{ "PartitionId":"0", "LastSequenceNumber":0, "LastEnqueuedTimeUtc":"0001-01-01T00:00:00", "LastEnqueuedOffset":null, "RetrievalTime":"0001-01-01T00:00:00" } }
I'd expect the serialization output to not have the CancellationToken:
{ "ConsumerGroupName":"$Default", "EventHubPath":"test", "PartitionId":"0", "Owner":"40eeeb3a-3491-4072-ba37-59ecdc330b6e", "RuntimeInformation":{ "PartitionId":"0", "LastSequenceNumber":0, "LastEnqueuedTimeUtc":"0001-01-01T00:00:00", "LastEnqueuedOffset":null, "RetrievalTime":"0001-01-01T00:00:00" } }
Copied from original issue: Azure/azure-event-hubs-dotnet#372
From @serkantkaraca on February 22, 2019 18:37
Please report the issue to WebJobs SDK. This is not something we can address here.
From @peterhuene on February 22, 2019 3:46
Actual Behavior
The Azure Functions Event Hubs trigger binding is sending a
PartitionContext
as part of the trigger metadata, serialized as JSON for extension languages.However, the type has a public
CancellationToken
property that should probably be suppressed from JSON serialization.Here's the JSON object that is serialized for the
PartitionContext
:Expected Behavior
I'd expect the serialization output to not have the
CancellationToken
:Versions
Copied from original issue: Azure/azure-event-hubs-dotnet#372