Skip to content

Remove BCC from x-death routing-keys #11230

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

Merged
merged 1 commit into from
May 14, 2024
Merged

Remove BCC from x-death routing-keys #11230

merged 1 commit into from
May 14, 2024

Conversation

ansd
Copy link
Member

@ansd ansd commented May 14, 2024

This commit is a follow up of #11174 which broke the following Java client test:

./mvnw verify -P '!setup-test-cluster' -Drabbitmqctl.bin=DOCKER:rabbitmq -Dit.test=DeadLetterExchange#deadLetterNewRK

The desired documented behaviour is the following:

routing-keys: the routing keys (including CC keys but excluding BCC ones) the message was published with

This behaviour should be respected also for messages dead lettered into a stream. Therefore, instead of first including the BCC keys in the #death.routing_keys field and removing it again in mc_amqpl before sending the routing-keys to the client as done in v3.13.2 in

RKs = [hd(RoutingKeys) | rabbit_basic:header_routes(Headers0)],
we instead omit directly the BCC keys from #death.routing_keys when recording a death event.

This commit records the BCC keys in their own mc bcc annotation in mc_amqpl:init/1.

This commit is a follow up of #11174
which broke the following Java client test:
```
./mvnw verify -P '!setup-test-cluster' -Drabbitmqctl.bin=DOCKER:rabbitmq -Dit.test=DeadLetterExchange#deadLetterNewRK
```

The desired documented behaviour is the following:
> routing-keys: the routing keys (including CC keys but excluding BCC ones) the message was published with

This behaviour should be respected also for messages dead lettered into a
stream. Therefore, instead of first including the BCC keys in the `#death.routing_keys` field
and removing it again in mc_amqpl before sending the routing-keys to the
client as done in v3.13.2 in
https://github.com/rabbitmq/rabbitmq-server/blob/dc25ef53292eb0b34588ab8eaae61082b966b784/deps/rabbit/src/mc_amqpl.erl#L527
we instead omit directly the BCC keys from `#death.routing_keys` when
recording a death event.

This commit records the BCC keys in their own mc `bcc` annotation in `mc_amqpl:init/1`.
@ansd ansd added this to the 3.13.3 milestone May 14, 2024
@ansd ansd marked this pull request as ready for review May 14, 2024 11:45
@ansd ansd requested a review from acogoluegnes May 14, 2024 13:13
@ansd ansd merged commit 1c4af0c into main May 14, 2024
@ansd ansd deleted the dead-letter-bcc branch May 14, 2024 14:50
ansd added a commit that referenced this pull request May 14, 2024
Remove BCC from x-death routing-keys (backport #11230)
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.

2 participants