minghuaw / fe2o3-amqp

A rust implementation of the AMQP1.0 protocol based on serde and tokio.
MIT License
64 stars 7 forks source link

Make Session/Link properties optional on Flow frames #267

Closed brandonros closed 3 months ago

brandonros commented 3 months ago

Microsoft AzureRelay server (very old) does not like the inclusion of the properties sent on Attach being added to the Flow frames. rhea also does not do this.

minghuaw commented 3 months ago

Below is just some related notes

Specs

http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-flow

A registry of commonly defined link state properties and their meanings is maintained [AMQPLINKSTATEPROP].

When the handle field is not set, this field MUST NOT be set.

Other implementations

name language properties included? (yes/no/configurable) ref code note
rhea javascript no https://github.com/amqp/rhea/blob/8fa5eb545e52732ee95e4a88597e19b7ec62bf05/dist/rhea-umd.js#L3344 n/a
amqpnetlite c# no https://github.com/Azure/amqpnetlite/blob/1362ac56b273a42e96e08ce270aa9f4907c30a76/src/Link.cs#L397 n/a
azure-amqp c# configurable (see note) https://github.com/Azure/azure-amqp/blob/943835ed5e085b3c06da7a8020a2585254d0e6e1/src/AmqpLink.cs#L1395 setting credit won't carry properties, but a separate function SendProperties is provided
Proton.Net c# no https://github.com/tabish121/Proton.NET/blob/ca57bb5cef750501093c5d3efd4e6a18dba49738/src/Proton/Engine/Implementation/ProtonReceiver.cs#L338 n/a
Qpid.Proton c (cpp, go, python, and ruby) no https://github.com/apache/qpid-proton/blob/7c08f80ed69745a4504b0c3e6325a4ae6baf2b3c/c/src/core/transport.c#L2051 n/a
go-amqp go no https://github.com/Azure/go-amqp/blob/1003610b1e679a884a60f9011c37e55c6eb07338/receiver.go#L626 n/a
qpid-proton-j java no https://github.com/apache/qpid-proton-j/blob/e4db33f448c9676f8a5ed809cbec3f93a0174ac1/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java#L483 n/a
qpid-protonj2 java no https://github.com/apache/qpid-protonj2/blob/e9de35dcd4d7a2c095aa984c4f67059c98036e61/protonj2/src/main/java/org/apache/qpid/protonj2/engine/impl/ProtonReceiver.java#L442 n/a
azure-uamqp-c c configurable (see note) https://github.com/Azure/azure-uamqp-c/blob/997e40ec9b8f9176319e0aee9c971f4590c32f74/src/session.c#L1265 session_send_flow takes a raw flow frame and modifies some fields based on the link but doesn't reset properties to null, so it's possible to send non-null properties using this function
minghuaw commented 3 months ago

I think the way forward will likely be similar to that of azure-amqp (see the note above). A separate function send_properties() will be added to allow users to explicitly send the properties. All other methods that requires the use of a Flow frame will NOT include the link's properties.