This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new fc496807858a CAMEL-26520: camel-alibaba-mns - deprecate 
MNSOperations.RECEIVE_MESSAGE and MNSEndpoint.resolveConsumerOperation() 
(#30799)
fc496807858a is described below

commit fc496807858af678ab167f234e1d743a142525fc
Author: Urmila Unni <[email protected]>
AuthorDate: Thu Nov 26 01:57:52 2026 +0530

    CAMEL-26520: camel-alibaba-mns - deprecate MNSOperations.RECEIVE_MESSAGE 
and MNSEndpoint.resolveConsumerOperation() (#30799)
    
    receiveMessage is no longer a value of the operation option since 
CAMEL-26259. Deprecate the constant and the unused method for removal, keep the 
producer's error message for operation=receiveMessage until the constant is 
removed, and add an upgrade guide entry.
    
    Closes #30799
    
    Co-authored-by: Claude <[email protected]>
---
 .../java/org/apache/camel/component/alibaba/mns/MNSEndpoint.java   | 5 +++++
 .../java/org/apache/camel/component/alibaba/mns/MNSProducer.java   | 2 ++
 .../camel/component/alibaba/mns/constants/MNSOperations.java       | 5 +++++
 .../camel/component/alibaba/mns/constants/MNSOperationsTest.java   | 2 ++
 .../modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc            | 7 +++++++
 5 files changed, 21 insertions(+)

diff --git 
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSEndpoint.java
 
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSEndpoint.java
index 5cf6886a33b2..13a216fd1ac3 100644
--- 
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSEndpoint.java
+++ 
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSEndpoint.java
@@ -319,6 +319,11 @@ public class MNSEndpoint extends ScheduledPollEndpoint {
         return MNSOperations.SEND_MESSAGE;
     }
 
+    /**
+     * @deprecated not used: the consumer receives the messages of the queue 
without reading the operation option. To be
+     *             removed in a future release.
+     */
+    @Deprecated(since = "4.24.0")
     public String resolveConsumerOperation() {
         if (operation != null) {
             return operation;
diff --git 
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSProducer.java
 
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSProducer.java
index c7ccffbb596e..6d976c5fe150 100644
--- 
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSProducer.java
+++ 
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/MNSProducer.java
@@ -41,6 +41,8 @@ public class MNSProducer extends DefaultProducer {
         super(endpoint);
     }
 
+    // RECEIVE_MESSAGE is deprecated, but its error message stays until the 
constant is removed
+    @SuppressWarnings("deprecation")
     @Override
     public void process(Exchange exchange) throws Exception {
         MNSEndpoint endpoint = getEndpoint();
diff --git 
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSOperations.java
 
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSOperations.java
index 6f3d0a0b5304..65a34b30de03 100644
--- 
a/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSOperations.java
+++ 
b/components/camel-alibaba/camel-alibaba-mns/src/main/java/org/apache/camel/component/alibaba/mns/constants/MNSOperations.java
@@ -19,6 +19,11 @@ package org.apache.camel.component.alibaba.mns.constants;
 public final class MNSOperations {
 
     public static final String SEND_MESSAGE = "sendMessage";
+    /**
+     * @deprecated receiveMessage is not an operation: the producer does not 
support it, and the consumer receives the
+     *             messages of the queue without reading the operation option. 
To be removed in a future release.
+     */
+    @Deprecated(since = "4.24.0")
     public static final String RECEIVE_MESSAGE = "receiveMessage";
     public static final String DELETE_MESSAGE = "deleteMessage";
     public static final String PUBLISH_MESSAGE = "publishMessage";
diff --git 
a/components/camel-alibaba/camel-alibaba-mns/src/test/java/org/apache/camel/component/alibaba/mns/constants/MNSOperationsTest.java
 
b/components/camel-alibaba/camel-alibaba-mns/src/test/java/org/apache/camel/component/alibaba/mns/constants/MNSOperationsTest.java
index 04b05e564b94..19cd6105bb78 100644
--- 
a/components/camel-alibaba/camel-alibaba-mns/src/test/java/org/apache/camel/component/alibaba/mns/constants/MNSOperationsTest.java
+++ 
b/components/camel-alibaba/camel-alibaba-mns/src/test/java/org/apache/camel/component/alibaba/mns/constants/MNSOperationsTest.java
@@ -22,6 +22,8 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 class MNSOperationsTest {
 
+    // RECEIVE_MESSAGE is deprecated, but its value is still checked until it 
is removed
+    @SuppressWarnings("deprecation")
     @Test
     void testOperationNames() {
         assertThat(MNSOperations.SEND_MESSAGE).isEqualTo("sendMessage");
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
index 6af4daf8000c..82b1610df148 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
@@ -10744,6 +10744,13 @@ Rename the alias of the key to the algorithm of the 
key, for example `RS256` for
 keytool -changealias -alias keycloak -destalias RS256 -keystore 
keycloak-realm.p12 -storetype PKCS12
 ----
 
+=== camel-alibaba-mns - MNSOperations.RECEIVE_MESSAGE and 
MNSEndpoint.resolveConsumerOperation() are deprecated
+
+`receiveMessage` is no longer a value of the `operation` option (CAMEL-26259): 
the producer does not support it, and
+the consumer receives the messages of the queue without reading the option. 
The `MNSOperations.RECEIVE_MESSAGE`
+constant and the `MNSEndpoint.resolveConsumerOperation()` method, which 
nothing calls, are deprecated and will be
+removed in a future release.
+
 === Jackson 3
 
 Camel 4.24 moves its own code to Jackson 3 (`tools.jackson`, version 3.2). The 
`camel-jackson`, `camel-jacksonxml`,

Reply via email to