Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amqp 1.0 Implementation #60

Merged
merged 23 commits into from
Feb 11, 2022
Merged

Amqp 1.0 Implementation #60

merged 23 commits into from
Feb 11, 2022

Conversation

Gsantomaggio
Copy link
Member

@Gsantomaggio Gsantomaggio commented Jan 26, 2022

Fixes #58

AMQP 1.0 Message implementation

Disclamer:
The implementation is not completed yet.
At the moment it supports:

  • Body
  • Annotations
  • ApplicationProperties
  • Properties

that are the most used attributes.

Code:

Most of the new code is inside the AMQP directory where you can find:

  • AmqpWireFormatting ( divided in AmqpWireFormattingRead and AmqpWireFormattingWrite partial classes)
    The class is responsible to read/write AMQP fields with the format codes
  • FormatCode with all the FormatCodes

How to test:

  • send messages from another stream client (GO, Java) with the attributes
  • send amqp 091 messages

Unit tests:

  • I generated some use cases with the goclient and put the dump as resources so I can test the decode from different sources
  • I saw some test code form amqp-net-lite and I did something similar
  • there is also a test with AMQP 091

@Gsantomaggio Gsantomaggio marked this pull request as draft January 26, 2022 18:43
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2022

Codecov Report

Merging #60 (5361b1a) into main (ae69253) will increase coverage by 1.43%.
The diff coverage is 93.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
+ Coverage   88.99%   90.42%   +1.43%     
==========================================
  Files          55       63       +8     
  Lines        3171     4252    +1081     
  Branches      132      254     +122     
==========================================
+ Hits         2822     3845    +1023     
- Misses        312      351      +39     
- Partials       37       56      +19     
Impacted Files Coverage Δ
RabbitMQ.Stream.Client/StreamSystem.cs 88.88% <ø> (ø)
Tests/UnitTests.cs 97.64% <ø> (ø)
RabbitMQ.Stream.Client/AMQP/Data.cs 76.66% <68.75%> (+4.87%) ⬆️
RabbitMQ.Stream.Client/WireFormatting.cs 71.94% <75.00%> (+3.87%) ⬆️
...itMQ.Stream.Client/AMQP/AmqpWireFormattingWrite.cs 79.23% <79.23%> (ø)
Tests/Utils.cs 88.31% <80.00%> (ø)
RabbitMQ.Stream.Client/AMQP/Map.cs 89.83% <89.83%> (ø)
RabbitMQ.Stream.Client/Message.cs 87.87% <94.11%> (+12.87%) ⬆️
...bitMQ.Stream.Client/AMQP/AmqpWireFormattingRead.cs 97.50% <97.50%> (ø)
RabbitMQ.Stream.Client/AMQP/Properties.cs 97.95% <97.95%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae69253...5361b1a. Read the comment docs.

@Gsantomaggio Gsantomaggio marked this pull request as ready for review February 8, 2022 14:57
@Gsantomaggio Gsantomaggio requested review from MarcialRosales and removed request for kjnilsson February 10, 2022 12:41
Copy link
Contributor

@MarcialRosales MarcialRosales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only comment to highlight because the PR is good to go as it is is maybe to unit tests the key classes like various parsers, and utility parsers and the publish and deliver commands. I believe by having unit tested these classes we can make the other tests cases which are more collaboration tests simpler with less data assertions because we know that the serialization works in all scenarios.
Other than that, it looks good to me.

@Gsantomaggio Gsantomaggio merged commit 42f1e8b into main Feb 11, 2022
@Gsantomaggio Gsantomaggio deleted the amqp_10_1 branch February 11, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AMQP 0.9.1 interoperability
3 participants