Skip to content

Messaging, part II.#13

Merged
aliakb merged 13 commits intodevfrom
unknown repository
Mar 19, 2012
Merged

Messaging, part II.#13
aliakb merged 13 commits intodevfrom
unknown repository

Conversation

@aliakb
Copy link

@aliakb aliakb commented Mar 14, 2012

  • Topic/subscription messaging;
  • Support for various content types;
  • Property bags on messages.

Some implementation details you may have questions about:

Public constructors in BrokeredMessageSettings class have been replaced with the static methods because JavaScript cannot handle multiple constructors with the same number of parameters.

Message's property bag is populated with all headers. I did this for compatibility wiht Java SDK, which does the same thing.

Copy link

Choose a reason for hiding this comment

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

the = is not aligned with the rest of the code. My recommendation is to shift the rest equal signs right wards to align with this one.

Copy link
Author

Choose a reason for hiding this comment

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

It's either allowing exceptions or updating each line in the file when a new constant exceeds the allotted line. I prefer exceptions.

Copy link

Choose a reason for hiding this comment

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

Hi Aliaksei, what is your reason to make it an exception.
--Gong

-----Original Message-----
From: Aliaksei Baturytski [mailto:reply@reply.github.com]
Sent: Monday, March 19, 2012 9:18 AM
To: Albert Cheng
Subject: Re: [azure-sdk-for-net] Messaging, part II. (#13)

@@ -32,7 +32,9 @@ internal static class Constants

     internal const string MessageDestination            = "{0}/messages/";
     internal const string UnlockedMessagePath           = "{0}/messages/head?timeout={1}";
  •    internal const string UnlockedSubscriptionMessagePath   = "{0}/subscriptions/{1}/messages/head?timeout={2}";
    

It's either allowing exceptions or updating each line in the file when a new constant exceeds the allotted line. I prefer exceptions.


Reply to this email directly or view it on GitHub:
https://github.com/WindowsAzure/azure-sdk-for-net/pull/13/files#r574869

Copy link

Choose a reason for hiding this comment

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

For now this is OK until we get StyleCop working together. I believe in general we avoid spacing statements this way, but it doe slook clean for constant strings. No need to change in my mind for now.

Copy link
Author

Choose a reason for hiding this comment

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

My reason was to minimize # of lines I am chaning - this pull request is big enough even already. Also, unless there's a restriction on length of constants/variables, you can never predict how much space you should allow between a variable and a value. I personally think that such formatting is definitely nice to have, but it should not be required because in case of long variable names it actually reduces readability of the code instead of improving it.

Copy link

Choose a reason for hiding this comment

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

Is there any follow-up required here, creating issues or filing a bug on the server, or can the code just be removed? OK to stay if it needs to be there for consistency.

Copy link
Author

Choose a reason for hiding this comment

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

I think it will be removed. I'll replace it with a plain comment.

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