-
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] Support MaxMessageSizeInKilobytes #17953
Changes from 28 commits
b7a15ca
ca193b8
4b1a28d
ac74691
5a3f61f
ab38a7f
a92b562
c7216a3
877e520
5ae1497
33c7a51
f591f89
d3a1972
a484888
3d44649
6ffc5c5
4f42563
f0039e0
1233921
f312390
1a90e13
e903476
83c6be2
393a3b9
8b5b21b
4dcc280
16a56b9
d8eccca
b73e9cb
70b8d32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,8 @@ export function buildTopicOptions(topic: CreateTopicOptions): InternalTopicOptio | |
AutoDeleteOnIdle: getStringOrUndefined(topic.autoDeleteOnIdle), | ||
EnablePartitioning: getStringOrUndefined(topic.enablePartitioning), | ||
EntityAvailabilityStatus: getStringOrUndefined(topic.availabilityStatus), | ||
EnableExpress: getStringOrUndefined(topic.enableExpress) | ||
EnableExpress: getStringOrUndefined(topic.enableExpress), | ||
MaxMessageSizeInKilobytes: getStringOrUndefined(topic.maxMessageSizeInKilobytes) | ||
}; | ||
} | ||
|
||
|
@@ -93,7 +94,12 @@ export function buildTopic(rawTopic: Record<string, any>): TopicProperties { | |
|
||
enableExpress: getBoolean(rawTopic[Constants.ENABLE_EXPRESS], "enableExpress"), | ||
|
||
availabilityStatus: rawTopic[Constants.ENTITY_AVAILABILITY_STATUS] | ||
availabilityStatus: rawTopic[Constants.ENTITY_AVAILABILITY_STATUS], | ||
|
||
maxMessageSizeInKilobytes: getInteger( | ||
rawTopic[Constants.MAX_MESSAGE_SIZE_IN_KILOBYTES], | ||
"maxMessageSizeInKilobytes" | ||
) | ||
}; | ||
} | ||
|
||
|
@@ -142,6 +148,13 @@ export interface CreateTopicOptions extends OperationOptions { | |
*/ | ||
maxSizeInMegabytes?: number; | ||
|
||
/** | ||
* The maximum message size in kilobytes for messages sent to this topic. | ||
* | ||
* (Configurable only for Premium Tier Service Bus namespace.) | ||
*/ | ||
maxMessageSizeInKilobytes?: number; | ||
|
||
/** | ||
* If enabled, the topic will detect duplicate messages within the time span | ||
* specified by the DuplicateDetectionHistoryTimeWindow property. | ||
|
@@ -243,6 +256,11 @@ export interface TopicProperties { | |
*/ | ||
maxSizeInMegabytes: number; | ||
|
||
/** | ||
* The maximum message size in kilobytes for messages sent to this queue/topic. | ||
*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add the note about being configurable only for Premium and service version 2021-05 or higher for each property? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added that note("configurable only for Premium") for the
How does it matter if the users can't configure the service version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The users can't configure the service version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like it should be configurable based on the TS guidelines - https://azure.github.io/azure-sdk/typescript_design.html#ts-service-versions-select-api-version There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. Should I add this in a future PR, @ramya-rao-a? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't we need to do this before releasing a new service version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a scenario where the customer would want to intentionally use the older API version? If so, then we can make sure we allow that before GA There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we recommend that libraries that use the SDK pin to a specific API version. So we should probably support that before GA. |
||
maxMessageSizeInKilobytes?: number; | ||
|
||
/** | ||
* If enabled, the topic will detect duplicate messages within the time span | ||
* specified by the DuplicateDetectionHistoryTimeWindow property. | ||
|
@@ -339,6 +357,12 @@ export interface InternalTopicOptions { | |
*/ | ||
MaxSizeInMegabytes?: string; | ||
|
||
/** | ||
* The maximum message size in kilobytes for messages sent to this queue/topic | ||
* | ||
*/ | ||
MaxMessageSizeInKilobytes?: string; | ||
|
||
/** | ||
* If enabled, the topic will detect duplicate messages within the time span | ||
* specified by the DuplicateDetectionHistoryTimeWindow property. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Used in most tests. Retrieve this value from a service-bus namespace in the Azure Portal. | ||
SERVICEBUS_CONNECTION_STRING="<connection string>" | ||
|
||
# Used in a couple of tests | ||
SERVICEBUS_CONNECTION_STRING_PREMIUM="<connection string>" | ||
|
||
# Used to authenticate using Azure AD as a service principal for role-based authentication. | ||
AZURE_TENANT_ID=<AD tenant id or name> | ||
AZURE_CLIENT_ID=<ID of the user/service principal to authenticate as> | ||
AZURE_CLIENT_SECRET=<client secret used to authenticate to Azure AD> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is always populated (as indicated in one of the comments), should it be nullable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will update