azure-webjobs-sdk-extensions: [Cosmos DB Trigger] Null _ts, _etag etc. properties from IReadOnlyList parameters.

Hi,

It appears that I can’t read _ts, _etag etc. properties from the change feed, even though I have them set in my entity like so:

[JsonConverter(typeof(UnixDateTimeConverter))]
[JsonProperty("_ts")]
public DateTime? LastModified {get;set;}

[JsonProperty("_etag")]
public string? Etag {get;set;}

I need this properties for processing my dead letter queue.

Thanks

Edit: This started working when I switch to the system text json custom serializer.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

The 2 Nugets I mention are the ones I authored, I’m not sure what the Worker version of the Nuget includes (the Dependencies section is empty) but looking at the Versions, it’s a mirror with the other ones.

So assuming that, it should work the same way (3.X uses the V2 SDK and Document, 4.X uses V3 SDK and can use your custom <T>), but since I didn’t author or work on those, I cannot confirm.

@Ved2806 - I cannot comment on the Worker packages as I don’t know who authored them or what they contain. I tried to repro the scenario with the packages we author and the scenario is simply not possible (using Entity instead of Document with version 3.0.9). Whoever owns the Worker packages might be able to comment on what do they actually include and work.