Skip to content

Commit

Permalink
Revert "Messaging: v2 stack amqp-core types and integration to Servic…
Browse files Browse the repository at this point in the history
…e Bus (#34854)"

This reverts commit 7409eb6.
  • Loading branch information
mssfang committed Dec 7, 2023
1 parent 2e23e25 commit 519b005
Show file tree
Hide file tree
Showing 59 changed files with 245 additions and 7,722 deletions.
3 changes: 0 additions & 3 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,7 @@
{
"filename": "sdk/servicebus/azure-messaging-servicebus/**",
"words": [
"anu",
"Conniey",
"liudmila",
"Milli",
"qpid",
"unretriable"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ the main ServiceBusClientBuilder. -->
<suppress checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" files="ServiceBusSessionReceiver(Async)?Client.java"/>

<suppress checks="com.azure.tools.checkstyle.checks.UseCaughtExceptionCauseCheck" files="ServiceBusMessageBatch.java"/>
<!-- Supress the BufferOverflowException thrown from encodedSize method, this exception is caught, mapped and logged at the callsite -->
<suppress checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" files="com.azure.messaging.servicebus.ServiceBusMessageBatch.java"/>

<!-- Suppress the long package name in autoconfigure.implementation.redis package -->
<suppress checks="PackageName" files="com.azure.spring.cloud.autoconfigure.implementation.redis.*" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2436,18 +2436,6 @@
<Bug pattern="SE_BAD_FIELD"/>
</Match>

<!-- The returned Disposable can be ignored since Scheduler is closed when Reactor closes. -->
<Match>
<Class name="com.azure.core.amqp.implementation.ReactorExecutor"/>
<Method name="start"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
</Match>
<Match>
<Class name="com.azure.core.amqp.implementation.ReactorExecutor"/>
<Method name="run"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
</Match>

<!-- For BinaryData, copying array contents degrades performance. The data returned as byte array from BinaryData is expected to be copied by the call if mutability is desired. -->
<Match>
<Class name="com.azure.core.implementation.util.ByteArrayContent"/>
Expand Down Expand Up @@ -2725,115 +2713,5 @@
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
</Match>

<!-- Field is not initialized in Ctr but necessary safety measures are in place when accessing it -->
<Match>
<Class name="com.azure.messaging.servicebus.NonSessionProcessor"/>
<Field name="rollingMessagePump"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>
<Match>
<Class name="com.azure.messaging.servicebus.SessionProcessor"/>
<Field name="rollingSessionsMessagePump"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>
<Match>
<Class name="com.azure.messaging.servicebus.ServiceBusProcessor"/>
<Field name="rollingMessagePump"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>
<!-- False positives -->
<Match>
<Class name="com.azure.messaging.servicebus.NonSessionProcessor$RollingNonSessionMessagePump"/>
<Or>
<Field name="builder"/>
<Field name="logger"/>
<Field name="disposable"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<Match>
<Class name="com.azure.messaging.servicebus.SessionProcessor$RollingSessionsMessagePump"/>
<Or>
<Field name="builder"/>
<Field name="logger"/>
<Field name="disposable"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<Match>
<Class name="com.azure.messaging.servicebus.ServiceBusProcessor$RollingMessagePump"/>
<Or>
<Field name="nonSessionBuilder"/>
<Field name="sessionBuilder"/>
<Field name="logger"/>
<Field name="disposable"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<!-- The RollingNonSessionMessagePump and RollingSessionsMessagePump doesn't need to be serializable -->
<Match>
<Class
name="com.azure.messaging.servicebus.NonSessionProcessor$RollingNonSessionMessagePump"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>
<Match>
<Class
name="com.azure.messaging.servicebus.SessionProcessor$RollingSessionsMessagePump"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>
<Match>
<Class
name="com.azure.messaging.servicebus.ServiceBusProcessor$RollingMessagePump"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>
<!-- False positives -->
<Match>
<Class
name="com.azure.messaging.servicebus.SessionsMessagePump$RollingSessionReceiver"/>
<Or>
<Field name="instrumentation"/>
<Field name="logger"/>
<Field name="messageFlux"/>
<Field name="receiversTracker"/>
<Field name="tracer"/>
<Field name="managementNode"/>
<Field name="serializer"/>
<Field name="workerScheduler"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<Match>
<Class
name="com.azure.messaging.servicebus.SessionsMessagePump$RollingSessionReceiver$NextSessionStream"/>
<Or>
<Field name="newSession"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<Match>
<Class
name="com.azure.messaging.servicebus.ServiceBusSingleSessionManager$SessionReceiverStream"/>
<Or>
<Field name="sessionReceiver"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<!-- The RollingSessionReceiver, NextSessionStream, $SessionReceiverStream doesn't need to be serializable -->
<Match>
<Class
name="com.azure.messaging.servicebus.SessionsMessagePump$RollingSessionReceiver"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>
<Match>
<Class
name="com.azure.messaging.servicebus.SessionsMessagePump$RollingSessionReceiver$NextSessionStream"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>
<Match>
<Class
name="com.azure.messaging.servicebus.ServiceBusSingleSessionManager$SessionReceiverStream"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>

<!-- Comment to force CI to run Spotbugs against all SDKs -->
</FindBugsFilter>
3 changes: 0 additions & 3 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,6 @@ com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1
# In the pom, the version update tag after the version should name the unreleased package and the dependency version:
# <!-- {x-version-update;unreleased_com.azure:azure-core;dependency} -->

unreleased_com.azure:azure-core;1.46.0-beta.1
unreleased_com.azure:azure-core-amqp;2.9.0-beta.8

# Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current
# version and set the version to the released beta. Released beta dependencies are only valid
# for dependency versions. These entries are specifically for when we've released a beta for
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/azure-core-amqp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.46.0-beta.1</version> <!-- {x-version-update;unreleased_com.azure:azure-core;dependency} -->
<version>1.46.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core;current} -->
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static LoggingEventBuilder addSignalTypeAndResult(LoggingEventBuilder log
* and {@code getDescription()} under {@code errorDescription} keys.
*
* If errorCondition is {@code null} does not add properties.
*
* @return updated {@link LoggingEventBuilder} for chaining.
*/
public static LoggingEventBuilder addErrorCondition(LoggingEventBuilder logBuilder, ErrorCondition errorCondition) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
package com.azure.core.amqp.implementation;

import com.azure.core.amqp.AmqpLink;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
import org.apache.qpid.proton.message.Message;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.io.UncheckedIOException;
import java.util.concurrent.RejectedExecutionException;
import java.util.function.Supplier;

/**
Expand All @@ -20,14 +18,6 @@
* Specification 1.0: Links</a>
*/
public interface AmqpReceiveLink extends AmqpLink {
/**
* Gets the unique identifier of the Amqp connection hosting the receive link.
*
* @return The connection identifier.
*/
// Note: Ideally, we may expose connectionId in AmqpLink, but given it's a public contract, lets not do that until a use case needing it.
String getConnectionId();

/**
* Initialises the link from the client to the message broker and begins to receive messages from the broker.
*
Expand All @@ -36,16 +26,6 @@ public interface AmqpReceiveLink extends AmqpLink {
*/
Flux<Message> receive();

/**
* Updates the disposition state of a message uniquely identified by the given delivery tag.
*
* @param deliveryTag delivery tag of message.
* @param deliveryState Delivery state of message.
*
* @return A Mono that completes when the state is successfully updated and acknowledged by message broker.
*/
Mono<Void> updateDisposition(String deliveryTag, DeliveryState deliveryState);

/**
* Schedule to adds the specified number of credits to the link.
*
Expand All @@ -59,17 +39,6 @@ public interface AmqpReceiveLink extends AmqpLink {
*/
Mono<Void> addCredits(int credits);

/**
* Schedules an event to send a credit to the broker. The API takes a {@link Supplier} that returns the credit
* to send. The supplier allows providing the most up-to-date credit value when the scheduler picks the scheduled
* work for execution rather than the credit at the time of scheduling.
*
* @param creditSupplier the supplier that returns the credit to send.
* @throws RejectedExecutionException if the scheduler rejects the scheduling attempt (e.g., the scheduler is closed).
* @throws UncheckedIOException if an IO error occurs when scheduling.
*/
void addCredit(Supplier<Long> creditSupplier);

/**
* Gets the current number of credits this link has.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,17 @@ public final class ClientConstants {
public static final String LINK_NAME_KEY = "linkName";
public static final String ENTITY_PATH_KEY = "entityPath";
public static final String ENTITY_NAME_KEY = "entityName";
public static final String UPDATED_LINK_CREDIT_KEY = "updatedLinkCredit";
public static final String REMOTE_CREDIT_KEY = "remoteCredit";
public static final String IS_PARTIAL_DELIVERY_KEY = "delivery.isPartial";
public static final String IS_SETTLED_DELIVERY_KEY = "delivery.isSettled";
public static final String SESSION_NAME_KEY = "sessionName";
public static final String FULLY_QUALIFIED_NAMESPACE_KEY = "namespace";
public static final String OPERATION_NAME_KEY = "amqpOperation";
public static final String DELIVERY_KEY = "delivery";
public static final String DELIVERY_STATE_KEY = "deliveryState";
public static final String DELIVERY_TAG_KEY = "lockToken";
public static final String ERROR_CONDITION_KEY = "errorCondition";
public static final String ERROR_DESCRIPTION_KEY = "errorDescription";
public static final String EMIT_RESULT_KEY = "emitResult";
public static final String SIGNAL_TYPE_KEY = "signalType";
public static final String HOSTNAME_KEY = "hostName";
public static final String INTERVAL_KEY = "intervalMs";
public static final String INTERVAL_KEY = "interval_ms";
public static final String SUBSCRIBER_ID_KEY = "subscriberId";
public static final String PUMP_ID_KEY = "pumpId";
public static final String CALL_SITE_KEY = "callSite";

/**
* The default maximum allowable size, in bytes, for a batch to be sent.
Expand Down
Loading

0 comments on commit 519b005

Please sign in to comment.