Conversation
…e expiry RabbitMQ 4.3 denies the deprecated feature transient_nonexcl_queues by default. Mocha declared its per-instance reply queue, and every other Temporary() queue, as non-durable, auto-delete and non-exclusive, so the broker refused the declare and the host failed in MessagingRuntimeHostedService.StartAsync. Temporary() now keeps the queue durable and scopes its lifetime through auto-delete plus an x-expires queue expiry, which RabbitMQ documents as the replacement for transient non-exclusive queues. The default expiry is 30 minutes; Temporary(TimeSpan) on the receive endpoint and queue descriptors sets a custom one. The declared-queue conflict check only rejects queues that are not auto-delete. The shared Testcontainers image moves from rabbitmq:3.11 to rabbitmq:4.3 so the RabbitMQ suites run against a broker with the new default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On a RabbitMQ 4.3 broker with default settings, a Mocha host using the RabbitMQ transport cannot start. RabbitMQ 4.3 moved the deprecated feature
transient_nonexcl_queuesfrom permitted to denied by default, and the transport declared its per-instance reply queue as non-durable, auto-delete and non-exclusive. The broker refuses that declare withINTERNAL_ERROR - Feature transient_nonexcl_queues is deprecated,MessagingRuntimeHostedService.StartAsyncfaults and the host exits. EveryTemporary()queue had the same shape. The suite did not catch it because the shared Testcontainers image was pinned torabbitmq:3.11.Changes
Temporary()on the RabbitMQ transport now means durable + auto-delete +x-expires, which the RabbitMQ docs name as the replacement for transient non-exclusive queues.RabbitMQQueue.MarkTemporaryno longer clearsDurable, the routing strategy stops forcingDurable = false, and the declared-queue conflict check only rejects a queue that is not auto-delete.Temporary(TimeSpan expiry)overload onIRabbitMQReceiveEndpointDescriptorandIRabbitMQQueueDescriptor, mirroring the Azure Service Bus transport. The default is 30 minutes viaRabbitMQReceiveEndpointConfiguration.TemporaryDefaults.Expiry. Non-positive values and values beyond thex-expiresinteger range throw.ThrowHelperfor the RabbitMQ transport project.rabbitmq:3.11torabbitmq:4.3inCookieCrumble.Resources.RabbitMQ, so the RabbitMQ suites run against a broker that denies the old shape.routing-and-endpoints.mdand the temporary endpoints section oftransports/rabbitmq.md.Tests
Temporary().rabbitmqctland pinsdurable=true,auto_delete=true,exclusive=false,arguments=[{"x-expires",1800000},{"x-queue-type","classic"}].Mocha.Transport.RabbitMQ.Tests: 472 passed againstrabbitmq:4.3.HotChocolate.Subscriptions.RabbitMQ.Tests: 8 passed against the same image.Behavior change
A
Temporary()queue with a stable name that still exists on a broker as non-durable fails redeclaration withPRECONDITION_FAILEDuntil its old consumer disconnects and auto-delete removes it. This only matters when an old and a new instance overlap on the same queue name. Reply queues use a fresh name per instance and are unaffected.