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

Amqp Message Update - API Change #17464

Merged
merged 25 commits into from
Nov 19, 2020

Conversation

hemanttanwar
Copy link
Contributor

@hemanttanwar hemanttanwar commented Nov 11, 2020

Design decisions:

  • Use one type to support Data, SEQUENCE, VALUE
  • We will use AmqpMessageBody for this.

This PR has changes in Amqp Message API based on various discussion and changes in dotnet API.
Since we have released Amqp Message API core-amqp in 1.6.0 GA. Following are breaking API update

  1. New AmqpMessageId ( Based on discussion from Clemens, dotnet had)

  2. New AmqpAddress ( Based on discussion from Clemens, dotnet had)

  3. Return type change in AmqpMessageProperties for above two new types.

Following changes are to keep consistency with dotnet and common prefix -> AmqpMessage

  1. Renamed AmqpDataBody to AmqpMessageBody (to be same name as in dotnet)

  2. Renamed AmqpBodyType to AmqpMessageBodyType (Same name in dotnet)

  3. Added AmqpMessageBody .getFirstData () Based on team review

  4. Returning IterableStream in AmqpMessageBody .getData () Based on team review

  5. Removed Copy constructor AmqpAnnotatedMessage (matching with dotnet) and because it is servicebus specific . So moving this logic into servicebus

Note: Having prefix AmqpMessage in all the Amqp type will help to bind all the types with one prefix.

dotnet : https://apiview.dev/Assemblies/Review/150b1bb087774addafaac6f04f00cdc5#Azure.Core.Amqp.AmqpMessageBody

Java API VIew : https://apiview.dev/Assemblies/Review/30680d3c215c4312a14e787044475bc9

fixes #17080

Comment on lines 27 to 28
* Creates instance of {@link AmqpMessageBody} with given {@link Iterable} of byte array. Please note that this
* version of the SDK supports only one element in given {@link Iterable}.
Copy link
Member

Choose a reason for hiding this comment

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

I guess we should make this javadoc crisp on why we do this. For the customer, this decision seems arbitrary and we need to document the justification for doing this. This, as we discussed earlier, has the potential for dropping data that is sent from another client that does support more than one byte[].

sdk/servicebus/azure-messaging-servicebus/pom.xml Outdated Show resolved Hide resolved
+ "message which is of type %s.", getBodyType().toString())));
}

return new IterableStream<>(Collections.singletonList(data));
Copy link
Member

Choose a reason for hiding this comment

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

Why do we create a new singletonList each time getData() is called? We can create the singletonList just once when fromData() is called.

@@ -59,12 +69,15 @@ public AmqpAnnotatedMessage(AmqpAnnotatedMessage message) {
AmqpMessageBodyType bodyType = message.getBody().getBodyType();
switch (bodyType) {
case DATA:
amqpMessageBody = AmqpMessageBody.fromData(message.getBody().getFirstData());
final byte[] data = message.getBody().getFirstData();
amqpMessageBody = AmqpMessageBody.fromData(Arrays.copyOf(data, data.length));
Copy link
Member

Choose a reason for hiding this comment

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

Just noting that we don't make a copy in .NET.

@@ -53,7 +48,7 @@ public static AmqpMessageBody fromData(byte[] data) {
Objects.requireNonNull(data, "'data' cannot be null.");
AmqpMessageBody body = new AmqpMessageBody();
body.bodyType = AmqpMessageBodyType.DATA;
body.data = Collections.singletonList(Arrays.copyOf(data, data.length));
body.data = Collections.singletonList(data);
Copy link
Member

Choose a reason for hiding this comment

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

Why do we not copy here, but do in the AmqpMessage ctor?

@@ -45,12 +48,19 @@ public AmqpAnnotatedMessage(AmqpMessageBody body) {

/**
* Creates instance of {@link AmqpAnnotatedMessage} with given {@link AmqpAnnotatedMessage} instance.
* The Current implementation only support {@link AmqpMessageBodyType#DATA DATA} AMQP data type. Track this
Copy link
Member

Choose a reason for hiding this comment

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

nit: upper-case 'C'
nit: 'supports', not 'support'

@@ -59,12 +69,15 @@ public AmqpAnnotatedMessage(AmqpAnnotatedMessage message) {
AmqpMessageBodyType bodyType = message.getBody().getBodyType();
switch (bodyType) {
case DATA:
amqpMessageBody = AmqpMessageBody.fromData(message.getBody().getFirstData());
final byte[] data = message.getBody().getFirstData();
amqpMessageBody = AmqpMessageBody.fromData(Arrays.copyOf(data, data.length));
Copy link
Member

Choose a reason for hiding this comment

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

Why are you copying the byte[] here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually removed copy constructor from AmqpAnnotatedMessage , since this was created for service bus needs. dotnet also do not have copy constructor.
And moved this logic into ServiceBusMessage, I still do Arrays.copyOf because when use is copying a ServiceBusReceivedMessage into ServiceBusMessage , changing one bytes should not effect bytes in other object. Thus I need to use Arrays.copyOf

Copy link
Member

Choose a reason for hiding this comment

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

You should clarify the behavior with @JoshLove-msft to ensure we are not doing needless copies. Specifically, where, if anywhere, does .NET copy in their amqp or service bus library. I would guess it is less than we do.

Copy link
Member

Choose a reason for hiding this comment

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

We do not copy the bytes - we just create a new instance of AmqpMessageBody wrapping the same bytes - https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusMessage.cs#L66-L72

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I will remove this copy from here.

@JoshLove-msft
Copy link
Member

The API View is out of date.

AmqpMessageBody messageBody = null;
switch (bodyType) {
case DATA:
messageBody = AmqpMessageBody.fromData(amqpAnnotatedMessage.getBody().getFirstData());
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious, what are the repercussions of a user doing this:

messageBody = amqpAnnotatedMessage.getBody();

Copy link
Member

Choose a reason for hiding this comment

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

Put another way...this code is demonstrating how to switch off the body type, but to me it raises questions about what it is actually demonstrating, and what the real use case is.

Copy link
Member

Choose a reason for hiding this comment

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

It would be good to clarify to the user in this sample code and / or Java why the code I put above is wrong, because I would guess that most people would do that by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated sample to clarify this why user should not call this directly.

Comment on lines +582 to +586
AmqpMessageId id = null;
if (messageId != null) {
id = new AmqpMessageId(messageId);
}
amqpAnnotatedMessage.getProperties().setMessageId(id);
Copy link
Member

Choose a reason for hiding this comment

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

So the Service Bus APIs will continue to be String-only forever? @hemanttanwar Can you provide sample code on how this would be done (either today or in the future) for Java using the approach Josh shares above?

@hemanttanwar
Copy link
Contributor Author

Response to this comment :
#17464 (comment)
Question :
"So the Service Bus APIs will continue to be String-only forever? @hemanttanwar Can you provide sample code on how this would be done (either today or in the future) for Java using the approach Josh shares above?"

I have discussed with @JonathanGiles and here are how we will provide support for UUID and other types in future

// User  want to set UUID via ServiceBusMessage, user will have to get to amqp message
// Sending a message with UUID as message ID
ServiceBusMessage messageToSend = new ServiceBusMessage("data");

// A Separate constructor for java native UUID class , 
// I have tested with current proton-j library and it works.

AmqpMessageId uuidId =  new AmqpMessageId(UUID.randomUUID()); 
messageToSend.getAmqpAnnotatedMessage().getProperties().setMessageId(uuidId);

We can have something like this in AmqpMessageId.java
AmqpMessageId {

    private UUID messageIdUUID;
    private Long messageIdLong;

    private MessageIdType type;

    public AmqpMessageId (String);
    public AmqpMessageId (UUID);
    public AmqpMessageId (Long);
   
  public Object getMessageAsUUID () ;

    @Override
    public String toString() {
        switch (type) {
            case STRING:
                return this.messageId;
            case UUID:
                return this.messageIdUUID.toString();
            case LONG:
                return this.messageIdLong.toString();
            default:
                // throw Error
        }
       
    }

    private enum MessageIdType {
        STRING,
        UUID,
        LONG;
    }

@JoshLove-msft
Copy link
Member

JoshLove-msft commented Nov 18, 2020

Response to this comment :
#17464 (comment)
Question :
"So the Service Bus APIs will continue to be String-only forever? @hemanttanwar Can you provide sample code on how this would be done (either today or in the future) for Java using the approach Josh shares above?"

I have discussed with @JonathanGiles and here are how we will provide support for UUID and other types in future

// User  want to set UUID via ServiceBusMessage, user will have to get to amqp message
// Sending a message with UUID as message ID
ServiceBusMessage messageToSend = new ServiceBusMessage("data");

// A Separate constructor for java native UUID class , 
// I have tested with current proton-j library and it works.

AmqpMessageId uuidId =  new AmqpMessageId(UUID.randomUUID()); 
messageToSend.getAmqpAnnotatedMessage().getProperties().setMessageId(uuidId);

We can have something like this in AmqpMessageId.java
AmqpMessageId {

    private UUID messageIdUUID;
    private Long messageIdLong;

    private MessageIdType type;

    public AmqpMessageId (String);
    public AmqpMessageId (UUID);
    public AmqpMessageId (Long);
   
  public Object getMessageAsUUID () ;

    @Override
    public String toString() {
        switch (type) {
            case STRING:
                return this.messageId;
            case UUID:
                return this.messageIdUUID.toString();
            case LONG:
                return this.messageIdLong.toString();
            default:
                // throw Error
        }
       
    }

    private enum MessageIdType {
        STRING,
        UUID,
        LONG;
    }

@hemanttanwar
Copy link
Contributor Author

Response to this comment :
#17464 (comment)
Question :
"So the Service Bus APIs will continue to be String-only forever? @hemanttanwar Can you provide sample code on how this would be done (either today or in the future) for Java using the approach Josh shares above?"
I have discussed with @JonathanGiles and here are how we will provide support for UUID and other types in future

// User  want to set UUID via ServiceBusMessage, user will have to get to amqp message
// Sending a message with UUID as message ID
ServiceBusMessage messageToSend = new ServiceBusMessage("data");

// A Separate constructor for java native UUID class , 
// I have tested with current proton-j library and it works.

AmqpMessageId uuidId =  new AmqpMessageId(UUID.randomUUID()); 
messageToSend.getAmqpAnnotatedMessage().getProperties().setMessageId(uuidId);

We can have something like this in AmqpMessageId.java
AmqpMessageId {

    private UUID messageIdUUID;
    private Long messageIdLong;

    private MessageIdType type;

    public AmqpMessageId (String);
    public AmqpMessageId (UUID);
    public AmqpMessageId (Long);
   
  public Object getMessageAsUUID () ;

    @Override
    public String toString() {
        switch (type) {
            case STRING:
                return this.messageId;
            case UUID:
                return this.messageIdUUID.toString();
            case LONG:
                return this.messageIdLong.toString();
            default:
                // throw Error
        }
       
    }

    private enum MessageIdType {
        STRING,
        UUID,
        LONG;
    }

Yes we can take care of Binary message id just like other types as well.
So we are on same page with this design.
When we implement this feature, we can take care of all the types for message id.

Copy link
Member

@JonathanGiles JonathanGiles left a comment

Choose a reason for hiding this comment

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

Assuming that this meets the goals of the service bus v-team, then I can no longer see any reason why this PR can't be merged. Let's make this the last time we break any AMQP API.

@hemanttanwar hemanttanwar merged commit 2bf7163 into Azure:master Nov 19, 2020
@hemanttanwar hemanttanwar deleted the sb-t2-amqp-message-redesign branch November 19, 2020 18:49
moderakh added a commit that referenced this pull request Nov 23, 2020
* Added support for key export. (#17183)

* Added support for exporting keys from an Azure Key Vault.

* Removed ExportKeyOptions.

* Fixed build error.

* Added samples.

* Fixed test issues.

* Fixed samples issues.

* Fixed checkstyle issues.

* Fixed spotbugs issues.

* Applied PR feedback: renamed KeyReleasePolicy to ReleasePolicy and removed it from KeyVaultKey.

* Fixed spotbugs issues.

* Added unit tests.

* Renamed ReleasePolicy to KeyReleasePolicy. Added tests for creating an RSA key with publicExponent.

* Added date for internal avro CHANGELOG (#17483)

* Sync eng/common directory with azure-sdk-tools for PR 1188 (#17488)

* Add debug flag to arm deployment command

* Only set debug preference when $CI is true

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Remove invalid characters in basename sourced from username (#17489)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* FixOfConnectionStateListenerTest (#17481)

* fix flakyness of connectionStateListener test

Co-authored-by: Annie Liang <xinlian@microsoft.com>

* Applied arch board feedback for Key Vault Administration (#17284)

* Removed exposure of implementation package and any usage of KeyVaultErrorException from public APIs.

* Renamed KeyVaultRoleAssignmentScope to KeyVaultRoleScope. Changed the name type from UUID to String in role assignment APIs.

* Renamed APIs for re-hydrating LROs.

* Added ServiceVersion support in the clients and their builders. Internally this will not be used until some changes in the code generation tool are applied.

* Annotated read-only classes with @immutable. Added the "allowed" prefix to some KeyVaultPermission properties. Change the type of `startTime` and `endTime` in KeyVaultLongRunningOperation from Long to OffsetDateTime.

* Changed the KeyVaultRoleScope enum from using URI to URL and added an overload that takes a the string representation of a URL.

* Added overloads that allow passing a custom polling interval to LROs.

* Removed the use of KeyVaultRoleAssignmentProperties in clients' public APIs in favor of using the `roleDefinitionId` and `servicePrincipalId` values directly.

* Fixed Javadoc and test issues.

* Fixed checkstyle issues.

* Applied arch board meeting and PR feedback:

* Renamed parameters containing the 'Uri' suffix to 'Url'.
* Changed the type of `startTime` and `endTime` in the constructor of KeyVaultLongRunningOperation and its subtypes from `Long` to `OffsetDateTime`.
* Removed unnecessary versions from KeyVaultAdministrationServiceVersion.

Additional changes:

* Renamed `scope` in KeyVaultRoleAssignment to `roleScope` to align with the access client APIs.
* Polished Javadoc

* Removed APIs to refresh LROs based on PR feedback.

* Removed unused import in KeyVaultBackupAsyncClientTest.

* Increment package version after release of com.azure azure-ai-metricsadvisor (#17456)

* Sync eng/common directory with azure-sdk-tools for PR 1170 (#17276)

* Added the preprocess scripts.

* string array to string

Co-authored-by: Sima Zhu <sizhu@microsoft.com>

* suppress the runtime exception in the KeyVaultClient class (#17401)

Co-authored-by: v-gaoh <v-gaoh@Microsoft.com>

* End to End TLS SSL step #8 - Add support for PEM based certificates (#17019)

* End to End TLS SSL - step #9 - add Azure AD authentication URL (#17074)

* Added Azure AD authentication URL

* Increment version for storage releases (#17485)

* Add Invoke-DevOpsAPI.ps1, Add functions for Canceling and Listing Builds (#17178)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>

* Change live test resource DeleteAfterHours tag to 8 hours (#17537)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* add clientOptions for EventHubClientBuilder (#17519)

- add clientOptions for EventHubClientBuilder

* Increment Form Recognizer version post patch release 3.0.3 (#17540)

* Prepare tables for October release (#17541)

* store authorzied clients into http session (#17528)

* Increment package version after release of com.azure azure-data-tables (#17545)

* [TA] Merge Novermber patch to master branch (#17544)

* cherry-pick 16c8d5d and dfdc8c6

* Added collapsible GA and Preview in each artifact. (#17041)

* Added support for encryption algorithms for symmetric keys (#17209)

* Added support for encryption AES encryption algorithms.

* Added CryptographyOptions and ensured the initialization vector is populated before attempting to perform any local cryptography operations on symmetric keys.

* Added APIs that accept CryptographyOptions to CryptographyClient.

* Fixed Javadoc issues.

* Fixed checkstyle issues. Added samples.

* Added checkstyle exceptions.

* Fixed test and spotbugs issues.

* Applied PR feedback and added local tests.

* Made the EncryptOptions and DecryptOptions constructor package-private, as well as their children's, and made them have factory methods for creating the former to help with discoverability.

* Fixed build issues.

* Changed EncryptOptions and DecryptOptions to use a factory model.

* Added iv, additionalAuthenticatedDate and authenticationTag to EncryptResult.

* Made `plainText` and `cipherText` all lowercase.

* Sync eng/common directory with azure-sdk-tools for PR 1202 (#17547)

* Add debugging link on resource deployment failures to log output

* Update aka link for live test help docs. Use here string and empty throw.

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Added small changes that missed PR #17209 (#17552)

* Added support for encryption AES encryption algorithms.

* Added CryptographyOptions and ensured the initialization vector is populated before attempting to perform any local cryptography operations on symmetric keys.

* Added APIs that accept CryptographyOptions to CryptographyClient.

* Fixed Javadoc issues.

* Fixed checkstyle issues. Added samples.

* Added checkstyle exceptions.

* Fixed test and spotbugs issues.

* Applied PR feedback and added local tests.

* Made the EncryptOptions and DecryptOptions constructor package-private, as well as their children's, and made them have factory methods for creating the former to help with discoverability.

* Fixed build issues.

* Changed EncryptOptions and DecryptOptions to use a factory model.

* Added iv, additionalAuthenticatedDate and authenticationTag to EncryptResult.

* Made `plainText` and `cipherText` all lowercase.

* Reverted capitalization change.

* Added null check for `iv` in local decryption.

* Key Vault Beta release CHANGELOG and README updates - November 2020 (#17553)

* Updated CHANGELOGs for Beta releases of Key Vault Keys and Key Vault Administration.

* Updated READMEs.

* Updated the KV Administration CHANGELOG to abide by the guidelines.

* [AppConfig] App config apply released v1.1.7 patch to master (#17548)

* [AppConfig] Prepare for v1.1.7 patch release (#17534)

* upgrade release version to 1.1.7

* Change the method of obtaining tokens from implicit flow to pkce (#17530)

* Upgrade msal.js to a higher version to use PKCE.

* [Communication] -Administration- Renaming the model from PhoneNumberSearch to PhoneNumberReservation (#17253)

* Renaming from PhoneNumberSearch to PhoneNumberReservation

* Renaming from PhoneNumberSearch to PhoneNumberReservation

* Renaming from PhoneNumberSearch to PhoneNumberReservation

* upadating readme samples

* Renaming the model CreateSearchReponse and CreateSearchOptions

* Fixing tests

* Fixing tests

* fixing typo un reservations

* Add AppConfig and Event Hubs samples for using Monitor exporter (#17565)

* Add AppConfig and Event Hubs samples for using exporters

* Fix compiler warnings

* Update sdk/monitor/microsoft-opentelemetry-exporter-azuremonitor/pom.xml

* Update method names

* Update amqp version post-1.7.0-beta.2 release (#17577)

* Sync eng/common directory with azure-sdk-tools for PR 1153 (#17578)

* Improve Update-ChangeLog Logic

* Updates to ChangeLog-Operations.ps1, copy-docs-to-blobstorage.ps1, Invoke-GitHubAPI.ps1 and Package-Properties.ps1

* More changeLog Logic Improvements

* Update date parsing

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>

* [Communication] -Administration- changing some createReservation from public to private (#17576)

* changing some public methods

* updating Reade file

* Fixing Readme

* November release changelog (#17571)

* [Service Bus] Remove viaPartitionKey (#17501)

* [Service Bus] Remove viaPartitionKey

* Remove unused imports

* Enable the del/rename files link check. (#17574)

* update readme for sample and fix some question (#17587)

* Add user name information when modifying todolist

* Modify the configuration information in the readme

* mgmt, improve readme in packages (#17251)

* add sample name with "resource-server" (#17589)

* change artifactId and module

* Update LanguageSetting.ps1 (#17583)

* Use BuildID to fix race ondition (#17459)

* Sync eng/common directory with azure-sdk-tools for PR 1210 (#17579)

* Cache created service principal for iteration

Useful when testing changes over and over again without passing your own -TestApplicationId and -TestApplicationSecret.

* Restore initial AzContext for New-TestResources

* Make sure PSBoundParameters is correct

Fixes #1177

Co-authored-by: Heath Stewart <heaths@microsoft.com>

* [Communication] - Administration - Disable Jacoco Coverage Check (#17596)

* Disable Adminiministrationg SDK  coverage check

* Adjusting min coverage checks

* Adjusting min coverage checks

* Adjusting min coverage checks

Co-authored-by: Minnie Liu <peiliu@microsoft.com>

* Fixed large file live test to add policy per call instead of per retry (#17593)

Co-authored-by: gapra <gapra@microsoft.com>

* fixes #17567 (#17588)

Add new configuration item: azure.activedirectory.jwk-set-cache-refresh-time

* [Communication] - SMS - Enabling SMS Live tests using Static Resources (#17599)

* Enabling SMS Live tests

* Clean up

* Adding more variables

* Fix SMS live test

* Clean up unneeded module from SMS pom

Co-authored-by: Minnie Liu <peiliu@microsoft.com>

* Increment package version after release of com.azure azure-security-keyvault-administration (#17600)

* User Oauth2 WebClient instead of msal to get groups from graph. (#17529)

* User Oauth2 WebClient instead of msal to get groups from graph.

* Increment key vault stable versions november 2020 (#17609)

* Updated the latest KV stable versions

* Corrected Key Vault Keys README version to the latest beta released.

* Mgmt: generate attestation.v2020_10_01 (#17611)

* add attestation/resource-manager

* generate attestation/resource-manager 2020 10

* add ci and pom

* remove unused configuration item (#17618)

* remove unused properties

* Fixed resource address in CosmosException.  (#17279)

* Fixed resource address in CosmosException. Added new API to expose regions contacted on CosmosDiagnostics

* Fixed resource address in GATEWAY mode to have full physical address

* Setting physical resource address in tests

* [service bus] Use ServiceBusException rather than AmqpException and rename ReceiveMode to ServiceBusReceiveMode (#17601)

ServiceBusException is basically a friendly envelope around an AmqpException. It's primary purpose is to give the user something simple they can try/catch that has a 'reason' code so they can programatically react to certain kinds of failures.

Also, renaming ReceiveMode to ServiceBusReceiveMode.

Fixes #17500 (exception type), #17555 (receive mode)

* update CHANGELOG (#17620)

- update Release history

* update CHANGELOG (#17634)

- update Release history

* Mgmt: GA all resourcemanager packages (#17619)

* Revert "Mgmt: GA azure, remove non-GA packages (#16499)"

This reverts commit 2756f50.

* fix spring cloud

* fix compile error

* update version

* fix spotbugs

* session record

* update readme version

* update Release history (#17646)

- update release history

* Increment package version after release of com.azure azure-security-keyvault-jca (#17644)

* Adding basic FeedRanges API (#17570)

* Initial draft of FeedRange artifacts

* Iterating on FeedRange Apis

* Adding public surface area

* Adding FeedRange unit tests

* Adding test FeedRangePKRangeId_GetEffectiveRangesAsync_Refresh

* Adding test FeedRangePKRangeId_GetEffectiveRangesAsync_Null

* Adding test feedRangeEPK_getPartitionKeyRangesAsync

* Adding test feedRangePK_getPartitionKeyRangesAsync

* Adding test feedRangePKRangeId_getPartitionKeyRangesAsync

* Adding request visitor unit tests

* Finishing FeedRange tests

* Cleanup and prettifying

* Prettifying feed range tests

* Fixes and new test for Conatiner.getFeedRanges()

* Addressing some SpotBug violations

* Reacting to code review feedback

* Update sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/feedranges/FeedRangeInternal.java

Co-authored-by: Mohammad Derakhshani <moderakh@users.noreply.github.com>

Co-authored-by: Mohammad Derakhshani <moderakh@users.noreply.github.com>

* [BlobStorage] Reuse the http client configured in the provided HttpPipeline during BlobBatch construction. (#17627)

* Reuse the http client configured in the provided HttpPipeline during BlobBatch construction.

* Include change log notes.

* Added ability to specify timeout unit in RequestRetryOptions (#17628)

* Add Update-java-CIConfig (#17631)

* Add Update-java-CIConfig

* Switch from BuildNumber to BuildID for test release versions

* Update EH versions to beta 2 (#17654)

`5.4.0-beta.1` and `1.4.0-beta.1` versions were released for EH and checkpointstore earlier this week from a release branch. So, the auto version increment PR was not created against `master` branch. This PR is to update the versions in `master` branch.

* Increment version for communication releases (#17608)

* Increment package version after release of com.azure azure-communication-sms

* Increment package version after release of com.azure azure-communication-administration

* Increment package version after release of com.azure azure-communication-common

* Increment package version after release of com.azure azure-communication-chat

* [service bus] Update ServiceBusProcessor sample to demo how to write a long-running processor. (#17633)

As part of the work to add in a ServiceBusErrorContext we also want to showcase how users can tease out the various errors that are reported. 

This PR updates the current processor sample to angle more towards how to keep a ServiceBusProcessor running long-term, including handling certain errors that _might_ be fatal (it's always up to the user to choose to terminate the processor).

Fix for #17490

* [service bus] Migration guide changes for errors, api changes, etc... (#17656)

Fixing some small stuff in the migration guide:

- processor error handler has a different signature, need to use the session builder, etc..
- some syntax errors (variable called client, usage uses 'sender')
- inconsistencies in some samples if they're pasted as is

* Replace the invalid open source link with working one. (#17602)

* Fixed bug where query params were being parsed incorrectly if an encoded comma was the query value (#17655)

* [service bus] Updating connection strings in migration guide to be consistent with readme (#17662)

Updating to the same string constant we use elsewhere in the SDK for samples.

Completes #17656

* Sync eng/common directory with azure-sdk-tools for PR 1203 (#17674)

* Refactoring artifact-metadata-parsing.ps1, update-docs-metadata.ps1, and create-tags-and-git-release.ps1

* Clean up common imports

* Refactor Update-docs-ci.ps1

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>

* Keep aad legacy code (#17664)

* checkout jialin's commit and make build pass.

* Change new property prefix from 'azure.activedirectory' to 'azure.active.directory'.

* Add resource searching sample description (#17615)

* Add resource searching sample description

* Add From Source Test Run to Live Tests (#17584)

* Add From Source test run to live tests

* Add From Source to matrix

* Amqp Message Update - API Change (#17464)

1. New Type AmqpMessageId ( Based on discussion from Clemens, dotnet had)

2. New Type AmqpAddress ( Based on discussion from Clemens, dotnet had)

3. Return type change in AmqpMessageProperties for above two new types.

3. Following changes are to keep consistency with dotnet and common prefix -> AmqpMessage

A. Renamed AmqpDataBody to AmqpMessageBody (to be same name as in dotnet)

B. Renamed AmqpBodyType to AmqpMessageBodyType (Same name in dotnet)

4. Added AmqpMessageBody .getFirstData () Based on team review

5. Returning IterableStream in AmqpMessageBody .getData () Based on team review

6. Removed Copy constructor AmqpAnnotatedMessage (matching with dotnet) and because it is servicebus specific . So moving this logic into servicebus

* [Communication] - Chat - Replaced ChatUserCredentialPolicy with BearerTokenAuthenticationPolicy (#17452)

* Replaced ChatUserCredentialPolicy with BearerTokenAuthenticationPolicy

* Removed ChatUserCredentialPolicy

* Added tests for CommunicationTokenCredential

* [TA] Healthcare recognition and Analyze LRO  (#17687)

* [TA] CodeGen based on 3.1-preview.3 (#17182)

- only codegen and fixes after codegen, there is no new implementation added.

* [TA] Healthcare Analyze feature (#17234)

* Added support for Healthcare Analyze and Cancellation endpoints

* [TA] Regenerate the swagger v3.1-Preview.3 with latest autorest version (#17358)

* regenerate with latest autorest and swagger, use 4.0.4 autorest to codegen instead of v4.0.2

* [TA] Add analyze tasks feature support (#17267)

* Add analyze multiple tasks and update healthcare features.

* Update test resource region to Central US for FormRecognizer (#17693)

* Vijay receive message ttl fix (#17678)

* Fixing a regresion in message converter.

* Changing version number.

* [TA] Prepare for November Release. (#17696)

* no AAD but add note for what reason AAD is not working for healthcare

* [service bus] Terminology clarification and small copy/paste errors in javadocs (#17691)

* Add tracing support for Service Bus processor (#17684)

* Add tracing support for SB processor

* Make addContext packag-private

* Resolve merge conflict

* Updated the Key Vault CHANGELOGs to include past stable releases. (#17701)

* Updated the Key Vault CHANGELOGs to include information about past stable releases.

* Updated Keys README.

* Increment package version after release of com.azure azure-ai-textanalytics (#17704)

* Swtich back to smoke-test before doc publishing error gets fixed. (#17697)

Co-authored-by: Sima Zhu <sizhu@microsoft.com>

* Increment package version after release of com.azure azure-security-keyvault-keys (#17705)

* Update '/eng/common/pipelines/templates/steps/create-pull-request.yml' to close test increment version pullrequests. (#17695)

* remove plugins to restore source and javadoc jar (#17680)

* Synapse: regenerate package-2019-06-01-preview (#17713)

* regenerate synapse package-2019-06-01-preview

* update version

* fix compile errors

* - update release history. (#17675)

- update release history

* Rename getAmqpAnnotatedMessage to getRawAmqpMessage (#17712)

Rename getAmqpAnnotatedMessage to getRawAmqpMessage

* Sync eng/common directory with azure-sdk-tools for PR 1219 (#17711)

* Move entire docgeneration into common tools

* Move docindex to common

* Added the package replacement logic

* Fixed on parameters

* Fixed param

* Change function to dash

* Added regex on function

* Added display name.

* Update eng/common/docgeneration/Generate-DocIndex.ps1

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Deal with js

* Add no new line args

* revert some test changes

* Need to default to the double quotes for JS regex

* Update Generate-DocIndex.ps1

* Added the appTitle

* type

Co-authored-by: Sima Zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* [Service Bus] Allow 0 prefetch and dynamically use batch size to request link credits (#17546)

* Fix Connection Closing on Timeout (#17690)

* Close connection when timeout occurs

* Add CHANGELOG entry

Co-authored-by: vcolin7 <vicolina@microsoft.com>
Co-authored-by: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Annie Liang <64233642+xinlian12@users.noreply.github.com>
Co-authored-by: Annie Liang <xinlian@microsoft.com>
Co-authored-by: Sima Zhu <sizhu@microsoft.com>
Co-authored-by: gaohan <1135494872@qq.com>
Co-authored-by: v-gaoh <v-gaoh@Microsoft.com>
Co-authored-by: Manfred Riem <manfred.riem@microsoft.com>
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
Co-authored-by: zhihaoguo <zhihaoguo@microsoft.com>
Co-authored-by: Sameeksha Vaity <savaity@microsoft.com>
Co-authored-by: Brandon Siegel <96068+bsiegel@users.noreply.github.com>
Co-authored-by: Yi Liu <yiliu6@microsoft.com>
Co-authored-by: Shawn Fang <45607042+mssfang@users.noreply.github.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: lzc-1997-abel <70368631+lzc-1997-abel@users.noreply.github.com>
Co-authored-by: paola Mariana vicencio Hernandez <pvicencio@microsoft.com>
Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com>
Co-authored-by: Jorge Beauregard <69869951+jbeauregardb@users.noreply.github.com>
Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
Co-authored-by: Chidozie Ononiwu <31145988+chidozieononiwu@users.noreply.github.com>
Co-authored-by: Heath Stewart <heaths@microsoft.com>
Co-authored-by: minnieliu <minnieliu96@hotmail.com>
Co-authored-by: Minnie Liu <peiliu@microsoft.com>
Co-authored-by: gapra <gapra@microsoft.com>
Co-authored-by: Jack Lu <dbqp99@msn.com>
Co-authored-by: Rujun Chen <Rujun.Chen@microsoft.com>
Co-authored-by: Tanyi Chen <tanchen@microsoft.com>
Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>
Co-authored-by: Richard Park <51494936+richardpark-msft@users.noreply.github.com>
Co-authored-by: Fabian Meiswinkel <fabianm@microsoft.com>
Co-authored-by: Francisco Fernández Castaño <francisco.fernandez.castano@gmail.com>
Co-authored-by: M <v-moaryc@microsoft.com>
Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>
Co-authored-by: Hemant Tanwar <hemant_tanwar@hotmail.com>
Co-authored-by: Vijaya Gopal Yarramneni <viyarr@microsoft.com>
Co-authored-by: Chuang <54572251+xccc-msft@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: Yijun Xie <48257664+YijunXieMS@users.noreply.github.com>
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-java that referenced this pull request Feb 22, 2022
fix publicnetworkaccess for preview in sb (Azure#17464)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core AMQP] AmpqAnnotatedMessage review follow up
6 participants