Code Monkey home page Code Monkey logo

Comments (5)

xinchen10 avatar xinchen10 commented on July 20, 2024

You are using the AMQP library indirectly through the IOT client which is built against the 2.0.6 package. That package contains the following strong named assembly.
Microsoft.Azure.Amqp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

The AMQP package 2.1.0 contains the following strong named assembly.
Microsoft.Azure.Amqp, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Notice that the minor version has been increased. When you manually update the AMQP library, NuGet automatically add the binding redirect in order to load the new version.

      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Azure.Amqp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
      </dependentAssembly>

With binding redirect, there is no guarantee that everything will work as is. While we try the best to maintain backward compatibility, breaking changes sometimes happen. In the AMQP library, the public surface is unfortunately larger than ideal. Many of them are for internal implementation only. When we introduce breaking changes to those APIs, we increase the minor version. However we are aware that currently the APIs are very poorly documented. We are adding the documentation and will specifically call out the APIs that are not meant for public use.

from azure-amqp.

CIPop avatar CIPop commented on July 20, 2024

Notice that the minor version has been increased.

We did notice that and assumed SemVer in which minor increases are guaranteed to not have breaking changes. If that's not the case, then I assume we need to fix this on our side?
Do you have information on what may have changed for us to see this hang with the new version?

from azure-amqp.

candersonio avatar candersonio commented on July 20, 2024

Do you have information on what may have changed for us to see this hang with the new version?

In case you haven't found it yet. I believe the breaking changeset is here:
9fb3dee#diff-aafcd5eed57dc6edc69fb1916381bee1

TransportBase had two of its abstract members' return types changed from Endpoint to string. In Microsoft.Azure.Device.Client the ClientWebSocketTransport (and LegacyClientWebSocketTransport) class inherits TransportBase. I fixed and built this locally then included them into a demo test app and now AMQP over WebSocket works as expected.

from azure-amqp.

DeluxZ avatar DeluxZ commented on July 20, 2024

I don't know if my problem is really related to this one. But I'm getting a Could not load file or assembly 'Microsoft.Azure.Amqp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. when using Microsoft.Azure.Amqp 2.1.2 in an Azure Function. I'm just callig var ioTRegistryClient = RegistryManager.CreateFromConnectionString(iotHubConnectionString);. Binding redirects are the same as stated above. This disappears when I'm downgrading to 2.0.6.

After some more searching I found a more related issue I guess Azure/azure-functions-host#992

from azure-amqp.

xinchen10 avatar xinchen10 commented on July 20, 2024

iot client has been updated to the latest version.

from azure-amqp.

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.