Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ATTACH target TRANSFER from client to server ATTACH source Merge session files Merge files rabbit_amqp1_0_session_process and rabbit_amqp1_0_session. Handle deliver action DETACH link and END session Fix credit reply from quorum queue Make following tests green: ``` make -C deps/rabbitmq_amqp1_0/ ct-amqp10_client t=tests:reliable_send_receive_with_outcomes_classic make -C deps/rabbitmq_amqp1_0/ ct-amqp10_client t=tests:reliable_send_receive_with_outcomes_quorum ``` Settle with state released if unroutable Fixes the following test: ``` make -C deps/rabbitmq_amqp1_0/ ct-amqp10_client t=tests:publishing_to_non_existing_queue_should_settle_with_released ``` Handle drain Make follwing tests green: ``` make -C deps/rabbitmq_amqp1_0/ ct-amqp10_client t=tests:roundtrip_classic_queue_with_drain make -C deps/rabbitmq_amqp1_0/ ct-amqp10_client t=tests:roundtrip_quorum_queue_with_drain ``` Handle send_credit_reply action Make the following test green: ``` make -C deps/rabbitmq_amqp1_0/ ct-amqp10_client t=tests:roundtrip_stream_queue_with_drain ``` Fix test expectation Make the following test green: ``` make -C deps/rabbitmq_amqp1_0/ ct-amqp10_client t=tests:message_headers_conversion ``` With Native AMQP, the behaviour of ``` Convert AMQP 0.9.1 message headers to application properties for an AMQP 1.0 consumer amqp1_0.convert_amqp091_headers_to_app_props = false | true (default false) Convert AMQP 1.0 Application Properties to AMQP 0.9.1 headers amqp1_0.convert_app_props_to_amqp091_headers = false | true (default false) ``` https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/rabbitmq_amqp1_0#configuration will break because we always convert according to the message container conversions. For example, 091 x-headers will go into message-annotations instead of application properties. Also, false won’t be respected since we always convert the headers with message containers. Either we decide to have this breaking change with Native AMQP or we need to respect the old behaviour of application parameters amqp1_0.convert_amqp091_headers_to_app_props and amqp1_0.convert_app_props_to_amqp091_headers when doing the message container conversions. Register connection Make the following test green: ``` make -C deps/rabbitmq_amqp1_0/ ct-proxy_protocol ``` Delete unused code Fix message annotation test expectation With message containers, the broker will include x-exchange and x-routing-key message annotations. Serialize footer makes the following test green: ``` make -C deps/rabbitmq_amqp1_0 ct-system t=dotnet:footer ``` Set first-acquirer in header Makes the following test green: ``` make -C deps/rabbitmq_amqp1_0 ct-system t=dotnet:redelivery ``` Fix queue confirmation crash Makes the following test green: ``` make -C deps/rabbitmq_amqp1_0/ ct-system t=dotnet:routing ``` Add some authz checks to make the following tests green: ``` make -C deps/rabbitmq_amqp1_0/ ct-system t=dotnet:access_failure make -C deps/rabbitmq_amqp1_0/ ct-system t=dotnet:access_failure_not_allowed make -C deps/rabbitmq_amqp1_0/ ct-system t=dotnet:access_failure_send ``` Delete unused code Adapt test expectation Makes the following test green: ``` make -C deps/rabbitmq_amqp1_0/ ct-system t=dotnet:streams ``` Fix dialyzer warnings bazel run gazelle excluding any changes for deps/proper Handle undefined msg ID from queue Makes the following tests green: ``` make -C deps/amqp10_client/ ct-system ``` Classic queues send an 'undefined' message ID to the channel when no ack is required. No ack is required when the send settle mode is settled. In this case it should be perfectly valid to always send the same (empty binary) delivery-tag from server to client. mix format deps/rabbitmq_cli/lib/rabbitmqctl.ex using Mix 1.15.4 (compiled with Erlang/OTP 26) Convert gen_server2 to gen_server Fix crash when basic message is received Makes the following test green: ``` bazel test //deps/rabbitmq_amqp1_0:amqp10_client_SUITE-mixed ``` Remove #outgoing_link.default_outcome Rename unconfirmed to incoming_unsettled_map to better match the AMQP spec terminology. Fix cherry-pick build failure Add MQTT 5.0 <-> AMQP 1.0 assertions Simplify rabbit_channel by removing extra AMQP 1.0 logic for settling unroutable messages with released state. This commit reverts the workaround introduced by PR 8015. Remove rabbit_queue_collector rabbit_queue_collector is responsible for synchronously deleting exclusive queues. Since the AMQP 1.0 plugin never creates exclusive queues, rabbit_queue_collector doesn't need to be started in the first place. This will save 1 Erlang process per AMQP 1.0 connection. Use 1 writer process per AMQP 1.0 connection AMQP 0.9.1 uses a separate rabbit_writer Erlang process per AMQP 0.9.1 channel. Prior to this commit, AMQP 1.0 used a separate rabbit_amqp1_0_writer Erlang process per AMQP 1.0 session. Advantage of single writer proc per session (prior to this commit): * High parallelism for serialising packets if multiple sessions within a connection write heavily at the same time. This commit uses a single writer process per AMQP 1.0 connection that is shared across all AMQP 1.0 sessions. Advantages of single writer proc per connection (this commit): * Lower memory usage with hundreds of thousands of AMQP 1.0 sessions * Less TCP and IP header overhead given that the single writer process can accumulate across all sessions bytes worth a MSS before flushing the socket. In other words, this commit decides that a reader / writer process pair per AMQP 1.0 connection is good enough for bi-directional TRANSFER flows. Having a writer per session is too heavy. The final goal by previous commits and follow-up commits is to reduce the total number of Erlang processes to allow hundreds of thousands of AMQP clients to connect while keeping resource usage in RabbitMQ at a low level. We still ensure high thoughput by having separate reader, writer, and session processes. Remove one supervisory level Given that we now have 1 writer per AMQP 1.0 connection, this commit changes the supervisor hierarchy such that only 1 additional process (rabbit_amqp1_0_session) is created per AMQP 1.0 session. Fix dialyze and xref `bazel run gazelle` wrongly removes the dependency on amqp_client due to a bug in the gazelle plugin. For now, we add a directive. Transform rabbit_amqp1_0_writer into gen_server Why: Prior to this commit, when clicking on the AMQP 1.0 writer process in observer, the process crashed. Instead of handling all these debug messages of the sys module, it's much better to implement a gen_server. There is no advantage of using a special OTP process over gen_server for the AMQP 1.0 writer. gen_server also provides cleaner format status output. How: Message callbacks return a timeout of 0. After all messages in the inbox are processed, the timeout message is handled by flushing any pending bytes. Add test for multiple sessions on same connection given that a single writer is used across multiple sessions. Remove stats timer from writer AMQP 1.0 connections haven't emitted any stats previously. Since Native AMQP 1.0 is targeted for 4.0 where metrics delivery via the Management API is removed anyway, we remove the stats timer from the 1.0 writer in this commit. Add better test for CLI connections listing Display connection properties in Management UI Make rabbit_confirms more efficient use lists:foldl/3 instead of lists:foldr/3. The returned order of confirmed sequence numers is not important since rabbit_channel will sort them anyway. Avoid lists:any/2 by checking within preceeding lists:foldl/3 Fix flawed serial number arithmetic Batch confirms and rejections When there are contiguous queue confirmations in the session process mailbox, batch them. When the confirmations are sent to the publisher, a single DISPOSITION frame is sent for contiguously confirmed delivery IDs and for the special case where no confirmations are outstanding anymore. This approach should be good enough. However it's sub optimal in scenarios where contiguous delivery IDs that need confirmations are rare, for example: * There are multiple links in the session with different sender settlement modes and sender publishes across these links interleaved. * sender settlement mode is mixed and sender publishes interleaved settled and unsettled TRANSFERs.
- Loading branch information