Skip to content
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

Feature/heh alternate exchanges #36

Merged
merged 8 commits into from
Nov 30, 2018

Conversation

hansehe
Copy link
Contributor

@hansehe hansehe commented Nov 26, 2018


Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.

@hansehe
Copy link
Contributor Author

hansehe commented Nov 26, 2018

PR for issue: #33

@@ -71,14 +70,14 @@ public async Task CanUseAlternateCustomExchangeName()
var topicWithAlternateExchange = $"{topic}@{alternateExchange}";

var subscriberAddresses = await rabbitMqTransport.GetSubscriberAddresses(topicWithAlternateExchange);
subscriberAddresses[0].Should().Be(topicWithAlternateExchange);
Assert.IsTrue(subscriberAddresses[0] == topicWithAlternateExchange);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a tiny remark: The Assert.IsTrue(...) syntax should only be used to check something that is actually a bool. In this case, if the strings are not equal, the error will just say "expected: true, was: false", which is pretty poor.

If you use

Assert.That(subscriberAddresses[0], Is.EqualTo(topicWithAlternateExchange));

then the error will be much better.

Just a tip 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! I'll do the update :)

@hansehe hansehe force-pushed the feature/heh-alternate_exchanges branch from f6e3256 to 6a22d1f Compare November 26, 2018 23:10
@hansehe
Copy link
Contributor Author

hansehe commented Nov 29, 2018

Seems like the integration test failed due to a fail with building the rabbitMq?

@mookid8000 mookid8000 self-assigned this Nov 30, 2018
@mookid8000 mookid8000 merged commit cb3479e into rebus-org:master Nov 30, 2018
@mookid8000
Copy link
Member

Excellent work 👍 – one thing though: What was the reasoning behind "publish on alternate exchanges enabled"? Why not just say that that's the way it always works?

@mookid8000
Copy link
Member

it's out in Rebus.RabbitMq 5.0.0-b08 now 😄

@hansehe
Copy link
Contributor Author

hansehe commented Nov 30, 2018

Well I implemented the 'Enabling' feature to preserve backwards compatibility, since it may be someone out there using an exchange with a '@' letter in the exchange name. Don't really sure if it's possible to have a '@' letter in an exchange name though.

Please just remove the 'Enabling' feature in the next release if you don't think it's a problem, and keep it enabled in all cases.

@mookid8000
Copy link
Member

I'll remove it. I don't like too many options 😄 Version 5 is not out yet, so this is a good time to make this change.

@mookid8000
Copy link
Member

it's removed in Rebus.RabbitMq 5.0.0-b09

@hansehe hansehe deleted the feature/heh-alternate_exchanges branch November 30, 2018 12:53
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