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

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new ebb747b9e7 ARTEMIS-4470 prevent the common trap
     new fdbe72ac73 This closes #4655
ebb747b9e7 is described below

commit ebb747b9e7863b0a8cb643e2ed304445a00209cc
Author: Petr Kužel <[email protected]>
AuthorDate: Thu Oct 26 17:05:41 2023 +0200

    ARTEMIS-4470 prevent the common trap
    
    Omitting reencode() results in latent error that surfaces only in
    AMQP-AMQP messaging.
---
 .../apache/activemq/artemis/api/core/Message.java  | 24 +++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
index 8975159a37..c8a731db51 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
@@ -466,6 +466,7 @@ public interface Message {
 
    void reloadPersistence(ActiveMQBuffer record, CoreMessageObjectPools pools);
 
+   /** Propagate message modifications to clients. */
    default void reencode() {
       // only valid probably on AMQP
    }
@@ -520,54 +521,75 @@ public interface Message {
       return null;
    }
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putBooleanProperty(String key, boolean value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putByteProperty(String key, byte value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putBytesProperty(String key, byte[] value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putShortProperty(String key, short value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putCharProperty(String key, char value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putIntProperty(String key, int value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putLongProperty(String key, long value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putFloatProperty(String key, float value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putDoubleProperty(String key, double value);
 
 
-
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putBooleanProperty(SimpleString key, boolean value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putByteProperty(SimpleString key, byte value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putBytesProperty(SimpleString key, byte[] value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putShortProperty(SimpleString key, short value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putCharProperty(SimpleString key, char value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putIntProperty(SimpleString key, int value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putLongProperty(SimpleString key, long value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putFloatProperty(SimpleString key, float value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putDoubleProperty(SimpleString key, double value);
 
    /**
     * Puts a String property in this message.
+    * <p>
+    * Callers must call {@link #reencode()} in order to be sent to clients
     *
     * @param key   property name
     * @param value property value
     */
    Message putStringProperty(String key, String value);
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putObjectProperty(String key, Object value) throws 
ActiveMQPropertyConversionException;
 
+   /** Callers must call {@link #reencode()} in order to be sent to clients */
    Message putObjectProperty(SimpleString key, Object value) throws 
ActiveMQPropertyConversionException;
 
    Object removeProperty(String key);

Reply via email to