diff --git a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc index 163b1bc4..39fb5cf4 100644 --- a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc +++ b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc @@ -54,7 +54,11 @@ However, Spring Boot has introduced a generic message container factory customiz Replace all instances of `ConcurrentPulsarListenerContainerFactoryCustomizer` with `org.springframework.boot.autoconfigure.pulsar.PulsarContainerFactoryCustomizer>`. +=== Removals +The following previously deprecated listener endpoint adapters have been removed in favor of default methods in the listener endpoint interfaces: +- `org.springframework.pulsar.config.PulsarListenerEndpointAdapter` +- `org.springframework.pulsar.reactive.config.ReactivePulsarListenerEndpointAdapter` === Breaking Changes diff --git a/spring-pulsar-reactive/src/main/java/org/springframework/pulsar/reactive/config/ReactivePulsarListenerEndpointAdapter.java b/spring-pulsar-reactive/src/main/java/org/springframework/pulsar/reactive/config/ReactivePulsarListenerEndpointAdapter.java deleted file mode 100644 index e10860c9..00000000 --- a/spring-pulsar-reactive/src/main/java/org/springframework/pulsar/reactive/config/ReactivePulsarListenerEndpointAdapter.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2022-2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.pulsar.reactive.config; - -import java.util.Collections; -import java.util.List; - -import org.apache.pulsar.client.api.SubscriptionType; -import org.apache.pulsar.common.schema.SchemaType; - -import org.springframework.lang.Nullable; -import org.springframework.pulsar.reactive.listener.ReactivePulsarMessageListenerContainer; -import org.springframework.pulsar.support.MessageConverter; - -/** - * Adapter to avoid having to implement all methods. - * - * @param Message payload type. - * @author Christophe Bornet - * @deprecated for removal in favor of {@link ReactivePulsarListenerEndpoint} - */ -@Deprecated(forRemoval = true) -public class ReactivePulsarListenerEndpointAdapter implements ReactivePulsarListenerEndpoint { - - @Override - public String getId() { - return null; - } - - @Override - public String getSubscriptionName() { - return null; - } - - @Override - public SubscriptionType getSubscriptionType() { - return SubscriptionType.Exclusive; - } - - @Override - public List getTopics() { - return Collections.emptyList(); - } - - @Override - public String getTopicPattern() { - return null; - } - - @Override - public Boolean getAutoStartup() { - return null; - } - - @Override - public void setupListenerContainer(ReactivePulsarMessageListenerContainer listenerContainer, - MessageConverter messageConverter) { - } - - @Override - public SchemaType getSchemaType() { - return null; - } - - @Nullable - @Override - public Integer getConcurrency() { - return null; - } - - @Override - public boolean isFluxListener() { - return false; - } - - @Override - public Boolean getUseKeyOrderedProcessing() { - return null; - } - -} diff --git a/spring-pulsar/src/main/java/org/springframework/pulsar/config/PulsarListenerEndpointAdapter.java b/spring-pulsar/src/main/java/org/springframework/pulsar/config/PulsarListenerEndpointAdapter.java deleted file mode 100644 index 38b04a08..00000000 --- a/spring-pulsar/src/main/java/org/springframework/pulsar/config/PulsarListenerEndpointAdapter.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2022-2023 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.pulsar.config; - -import java.util.Collection; -import java.util.Collections; -import java.util.Properties; - -import org.apache.pulsar.client.api.SubscriptionType; -import org.apache.pulsar.common.schema.SchemaType; - -import org.springframework.lang.Nullable; -import org.springframework.pulsar.listener.AckMode; -import org.springframework.pulsar.listener.PulsarMessageListenerContainer; -import org.springframework.pulsar.support.MessageConverter; - -/** - * Adapter to avoid having to implement all methods. - * - * @author Soby Chacko - * @author Alexander Preuß - * @deprecated for removal in favor of {@link PulsarListenerEndpoint} - */ -@Deprecated(forRemoval = true) -public class PulsarListenerEndpointAdapter implements PulsarListenerEndpoint { - - @Override - public String getId() { - return null; - } - - @Override - public String getSubscriptionName() { - return null; - } - - @Override - public SubscriptionType getSubscriptionType() { - return SubscriptionType.Exclusive; - } - - @Override - public Collection getTopics() { - return Collections.emptyList(); - } - - @Override - public String getTopicPattern() { - return null; - } - - @Override - public Boolean getAutoStartup() { - return null; - } - - @Override - public void setupListenerContainer(PulsarMessageListenerContainer listenerContainer, - MessageConverter messageConverter) { - - } - - @Override - public boolean isBatchListener() { - return false; - } - - @Override - public SchemaType getSchemaType() { - return null; - } - - @Override - public Properties getConsumerProperties() { - return null; - } - - @Nullable - @Override - public Integer getConcurrency() { - return null; - } - - @Override - public AckMode getAckMode() { - return null; - } - -}