File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/main/java/com/rabbitmq/stream Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,29 @@ public interface Message {
86
86
*/
87
87
Map <String , Object > getMessageAnnotations ();
88
88
89
+ /**
90
+ * Add a message annotation to the message.
91
+ *
92
+ * @param key the message annotation key
93
+ * @param value the message annotation value
94
+ * @return the modified message
95
+ * @since 0.12.0
96
+ */
89
97
default Message annotate (String key , Object value ) {
90
98
this .getMessageAnnotations ().put (key , value );
91
99
return this ;
92
100
}
93
101
102
+ /**
103
+ * Create a copy of the message.
104
+ *
105
+ * <p>The message copy contains the exact same instances of the original bare message (body,
106
+ * properties, application properties), only the message annotations are actually copied and can
107
+ * be modified independently.
108
+ *
109
+ * @return the message copy
110
+ * @since 0.12.0
111
+ */
94
112
default Message copy () {
95
113
return this ;
96
114
}
You can’t perform that action at this time.
0 commit comments