Skip to content

Conversation

@MaxNau
Copy link
Contributor

@MaxNau MaxNau commented Aug 30, 2025

[Host.RabbitMQ] Improve Validation and Default Exchange Handling

Enhances validation for consumer and producer settings to properly support the default exchange.

  • ✅ Avoids declaring or binding the default exchange (handled internally by RabbitMQ).
  • ✅ Adds clearer error messages for missing or invalid configuration.
  • ✅ Logs when default exchange operations are intentionally skipped.

ℹ️ This ensures correct behavior when working with the default exchange (""), which is a pre-declared direct exchange that automatically binds queues by their name.

@MaxNau MaxNau marked this pull request as ready for review August 30, 2025 15:56
@MaxNau MaxNau changed the title RabbitMQ: allow pub/sub to queues bound to default exchange [Host.RabbitMQ] Improve Validation and Default Exchange Handling Aug 30, 2025
@MaxNau MaxNau force-pushed the feature/rabbitmq-default-exchange branch 4 times, most recently from 8334b0a to a27317f Compare August 30, 2025 16:35
@zarusz
Copy link
Owner

zarusz commented Sep 1, 2025

Hey @MaxNau — thanks for the contribution! You’re on the right track.

Could you also:

  • Add a note about the "default exchange" to provider_rabbitmq.md (you can reuse the summary I generated in the issue comment).
  • Add tests covering the validations.

@zarusz zarusz added this to the 3.3.2 milestone Sep 1, 2025
@MaxNau MaxNau force-pushed the feature/rabbitmq-default-exchange branch from e59e154 to a3931b9 Compare September 1, 2025 09:53
@MaxNau
Copy link
Contributor Author

MaxNau commented Sep 1, 2025

Hey @MaxNau — thanks for the contribution! You’re on the right track.

Could you also:

* Add a note about the "default exchange" to `provider_rabbitmq.md` (you can reuse the summary I generated in the issue comment).

* Add tests covering the validations.

@zarusz done

@zarusz
Copy link
Owner

zarusz commented Sep 1, 2025

Looks good @MaxNau! I will merge and release this soon as 3.3.2.

@zarusz
Copy link
Owner

zarusz commented Sep 1, 2025

@MaxNau can you squash your commits into 1 commit (with signed off statement)?
Then I am happy to merge.

Signed-off-by: Max Nau <[email protected]>
Signed-off-by: governor <[email protected]>

Add integration test for default exchange publishing and consuming

Signed-off-by: Max Nau <[email protected]>
Signed-off-by: governor <[email protected]>

Update readme with default exchange section

Signed-off-by: governor <[email protected]>

Add RabbitMqTopologyServiceTests

Signed-off-by: governor <[email protected]>

Add RabbitMqMessageBusSettingsValidationServiceTests

Signed-off-by: governor <[email protected]>
@MaxNau MaxNau force-pushed the feature/rabbitmq-default-exchange branch from 1c940fc to c650665 Compare September 1, 2025 15:16
@MaxNau
Copy link
Contributor Author

MaxNau commented Sep 1, 2025

@MaxNau can you squash your commits into 1 commit (with signed off statement)? Then I am happy to merge.

@zarusz done

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 1, 2025

@zarusz zarusz merged commit 99baec2 into zarusz:master Sep 1, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants