-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Service Bus] Correlation Filter: Types for userProperties and SqlParameter, matching userProperties in the rules with those set on the message #9850
Comments
Supported types for the values set in user-properties in the correlation-filter in .NET and the equivalents in JS/TS
FYI: For supporting "long", "dateTime" and "duration", I guess I would need to compare the serialized request with that of .NET's to make them work. What about "bigint"? |
Yes, but sharing some thoughts:
I hope not! Honestly strings are better than Long because at least with strings it's easy to get a standard bigint out of it. Unfortunately bigints aren't broadly available enough to be our only story here 👍
Date is what you should use. You may have to manually serialize it to an expected date format (e.g. via
I wouldn't ignore, but represent as a number of seconds or similar. |
Summarizing my discussion with @JoshLove-msft
|
Question: |
Stronger typing is preferred if it's accurate. |
More findings on the values in properties of the message
From the above, it seems Conclusions(from my findings)To conclude, the properties should be Thoughts anybody? |
What do you get if someone uses a separate library to save the properties (like .NET) and then you try to deserialize them? An error? |
As of now.. we throw an error. The goal is to support those types too, both during serializing and deserializing, before GA. |
Here is the properties section of the correlation filter creation request containing string, long, datetime, and duration and the corresponding code that sets the correlationRuleFilter properties: correlationRuleFilter.Properties.Add("customKey", "customValue");
correlationRuleFilter.Properties.Add("long", (long) 4);
correlationRuleFilter.Properties.Add("dto", DateTime.UtcNow);
correlationRuleFilter.Properties.Add("timespan", TimeSpan.FromDays(1));
|
Final thoughts regarding correlation-rule props and types supported keeping interop with .NET SDK in mind... #9850
For duration, @xirzec 's suggestion (with reference to the tables SDK) properties: {[key: string]: string | number | boolean | Date | SBDuration}
SBDuration = {val:string, kind:"dateTime"} // val would be ISO-8601 string
// Same for Long and anything else that we don't have a type for (And that makes all the three issues mentioned to be non-breaking and it should be fine to add support even after GA.) Feedback from @bterlson: (offline discussion)
|
…lues under properties (#12349) ### Issue #9850 (part 9) ### Description This PR is regarding the serialization/deserialization of int-double-number types in the applicationProps under correlation rule filter and the optimal way to support them in the SDK. <img src="https://user-images.githubusercontent.com/10452642/98731900-3eee6280-2353-11eb-8da1-81c0e8cb731d.png" height=150> #### Before this PR All numbers are treated as "int" #### With this PR For serialization, numbers are treated as "double". During deserialization, "int" and "double" are treated as numbers.(To allow interop) Reference #9850 (comment)
Moving the PR #12570 that attempted to add the duration support to a branch as suggested by @ramya-rao-a for future reference. https://github.com/Azure/azure-sdk-for-js/tree/harshan/sb%2Fissue-9850%2Ffilter-interop It's not straightforward for the AMQP side, needs more testing w.r.t duration for AMQP.. questions to be asked below
|
Hi @HarshaNalluru, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
Thoughts/Needs work
Followups/todos on the types allowed in userParameters for the createRule(or updateRule) method in the ATOM Management API.
sqlParameter
only verify "string" and "number", we should look into the other types with more emphasized testing on the supported types for theSqlParameter
.userProperties
set on the message since they are the ones that should be matched with these from the correlationFilters, I don't think we do any sort of type validations for the userProperties on the message, but we seem to be applying JSON.stringify() on the message/message-body which might affect the rules/matching. In the end, we need to ensure that the userProperties in the rules match the same ones set on the message.Action Items
properties: {[key: string]: string | number | boolean}
sqlParameters: {[key: string]: string | number | boolean}
properties: {[key: string]: string | number | boolean | Date}
Final Thoughts - #9850 (comment)
The text was updated successfully, but these errors were encountered: