Skip to content

Support RabbitMQ 4.3+ in pushToQueue - #27

Open
W0rma wants to merge 1 commit into
Codeception:masterfrom
W0rma:fix-rabbitmq-4
Open

W0rma wants to merge 1 commit into
Codeception:masterfrom
W0rma:fix-rabbitmq-4

Conversation

@W0rma

@W0rma W0rma commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RabbitMQ 4.3 denies transient non-exclusive queues by default. pushToQueue() declared queues with php-amqplib's defaults (non-durable, non-exclusive), so it failed with:

INTERNAL_ERROR - Feature transient_nonexcl_queues is deprecated. By default, this feature is not permitted anymore.

Changes

  • RabbitMQ 4.3+: pushToQueue() checks whether the queue exists. If it is missing, it is created as a durable, non-auto-delete queue. Existing queues are used as they are.
  • RabbitMQ < 4.3: behavior is unchanged (same queue_declare() call as before).
  • The broker version is read from the connection's server properties. Pre-releases like 4.3.0-rc.1 are handled.
  • Tests: removed the explicit transient queue1 declaration from the test setup and added a test for pushing to a queue that doesn't exist yet.
  • CI: runs against RabbitMQ 3 and 4.

RabbitMQ 4.3 denies transient non-exclusive queues by default, which
made pushToQueue fail when it declared the queue with php-amqplib's
defaults. On 4.3+ the queue is now only declared if it is missing, and
then as a durable queue. Behavior on older versions is unchanged.

CI now runs against RabbitMQ 3 and 4.
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.

1 participant