cloudevents / sdk-csharp

CSharp SDK for CloudEvents
Apache License 2.0
281 stars 82 forks source link

CloudNative.CloudEvents.RabbitMq #310

Open antiblue opened 2 months ago

antiblue commented 2 months ago

Hi, I worked on an AMQP 0.9.1 protocol binding using the RabbitMq.Client.

I followed the "RabbitMQ Protocol Binding for CloudEvents" specification and looked (of course) at how the AMQP 1.0 bindings here do things.

I would like to create a PR to get this integrated into the sdk-csharp.

jskeet commented 2 months ago

That sounds fine, yes. Maybe leave this issue open for any discussion about aspects that there isn't code for yet, and create a PR to add the library (and tests).

jskeet commented 2 months ago

(If the new library can be independent of the existing Amqp library, that would be handy in terms of diamond dependencies etc, but let me know if that doesn't work out. I really don't know a lot about this area I'm afraid.)

antiblue commented 2 months ago

Yes, I could not use the existing library and the new one does not depend on CloudNative.CloudEvents.Amqp or AMQPNetLite

antiblue commented 2 months ago

Hi @jskeet I face a strange issue. I am unable to restore packages on my branch because he basically tries to find itself.

The error message is [NU1101] Unable to find package CloudNative.CloudEvents.RabbitMq. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org at (0:0)

Any ideas?

jskeet commented 2 months ago

I'll see if I can find time to pull your branch and reproduce, but I make no guarantees I'm afraid.

jskeet commented 2 months ago

Got it - the problem is that it's trying to compare the current code with a previous version of the same package (for backward compatibility). Add this into the property group:

<EnablePackageValidation>false</EnablePackageValidation>

... then do a full rebuild. It should work at that point.