Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

[WIP] Fixed ToTransportAddress by making the translation explicit #316

Closed
wants to merge 1 commit into from

Conversation

SzymonPobiega
Copy link
Member

The previous version with ToString would include all instance properties (if provided) which is not something we want in the address.

@SzymonPobiega SzymonPobiega self-assigned this Aug 31, 2016
@SzymonPobiega SzymonPobiega changed the title Fixed ToTransportAddress by making the translation explicit [WIP] Fixed ToTransportAddress by making the translation explicit Aug 31, 2016
@yvesgoeleven
Copy link
Contributor

@SzymonPobiega it doesn't appear to compile on the buildserver due to missing QueueName & Discriminator properties, is there some version dependency mismatch?

@SzymonPobiega
Copy link
Member Author

@yvesgoeleven it is WIP because the parent one is not yet merged. I'll create a non-WIP version that does not depend on that change in the core.

@@ -27,7 +27,19 @@ public override EndpointInstance BindToLocalEndpoint(EndpointInstance instance)

public override string ToTransportAddress(LogicalAddress logicalAddress)
{
return logicalAddress.ToString();
var queue = new StringBuilder(logicalAddress.QueueName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why couldn't this be encapsulated in LogicalAddress.ToString()?
Or, alternatively, not to have a LogicalAddress.ToToTransportAddress()?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the actual code depends on the transport. I mean, different transport can use different separators for qualifiers and discriminators (e.g. SQL) and can use additional properties (MSMQ, SQL)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you @SzymonPobiega.
So discriminator and qualifier are mutually exclusive? Sorry for pestering with these questions, want to understand :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, in the current core code qualifier and discriminator are mutually exclusive. There is even a check in LogicalAddress which prevents creating an address with both. The idea is that the satellite queues (which have qualifier) are always shared by all instances.

I am not entirely sure if this is a permanent property but it seems unlikely that we'll have a per-instance satellites any time soon.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you @SzymonPobiega

@SzymonPobiega
Copy link
Member Author

Replaced by #318 which does not require changes in the core.

@SzymonPobiega SzymonPobiega deleted the refactor-logical-address branch September 1, 2016 10:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants