GithubHelp home page GithubHelp logo

Microsoft.Azure.WebJobs.Extensions.EventGrid.EventGridEvent is obsolete, but new version doesn't work with EventGridTrigger about azure-functions-eventgrid-extension HOT 2 CLOSED

azure avatar azure commented on June 16, 2024
Microsoft.Azure.WebJobs.Extensions.EventGrid.EventGridEvent is obsolete, but new version doesn't work with EventGridTrigger

from azure-functions-eventgrid-extension.

Comments (2)

gdodd1977 avatar gdodd1977 commented on June 16, 2024 1

Ok. That makes sense. I will give it a shot with the JObject. Assuming that works, I will come back and close this out. Thanks!

from azure-functions-eventgrid-extension.

jeffhollan avatar jeffhollan commented on June 16, 2024

This is an understandable confusion. Here's the answer and then some history. In short with v1 functions and event grid the best option is to bind to JObject as the v1 runtime comes with its own version of EventGridEvent which is different from Microsoft.Azure.EventGrid.Models.EventGridEvent. Once inside the execution you should be able to convert the JObject to an EventGrid.Models.EventGridEvent I believe - but you will likely need to reference via the full namespace path as will be two instances of EventGridEvent classes.

The history is because when we first launched the Event Grid trigger there was no Event Grid SDK so we built our own model. A few months later they launched the event grid SDK. However one of the downsides of the v1 runtime is we can't do breaking changes without breaking existing apps as extensions ship with the host. So we decided not to update v1 to support the EventGrid.Models.EventGrid as it would break previously bulit apps. For v2 though we do have flexibility to version so v2 apps will use the SDK.

It shouldn't have any negative effects - it's just how the message gets serialized into your function. The only downside as mentioned is if you do try to use the EventGrid SDK you may have two EventGridEvent classes so you will need to specify exactly which one you intend -- and the EventGrid SDK one can't be used as the trigger type.

Hopefully that makes some sense

from azure-functions-eventgrid-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.