File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
openmessaging-api/src/main/java/io/openmessaging/consumer Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
package io .openmessaging .consumer ;
19
19
20
+ import io .openmessaging .message .Header ;
21
+
20
22
/**
21
23
* A {@code MessageReceipt} is a {@code Message} with a {@code Receipt}.
22
24
*
23
25
* @version OMS 1.0.0
24
26
* @since OMS 1.0.0
25
27
*/
26
28
public interface MessageReceipt {
29
+ /**
30
+ * {@code OFFSET} represents this message offset in partition.
31
+ * <p>
32
+ *
33
+ * @param offset The offset in the current partition, used to quickly get this message in the queue
34
+ */
35
+ void setOffset (long offset );
36
+
37
+ /**
38
+ * This method will return the {@code OFFSET} in the partition to which the message belongs to, but the premise is
39
+ * that the implementation of the server side is dependent on the partition or a queue-like storage mechanism.
40
+ *
41
+ * @return The offset of the partition to which the message belongs.
42
+ */
43
+ long getOffset ();
44
+
45
+ /**
46
+ * The {@code MESSAGE_ID} header field contains a value that uniquely identify each message sent by a {@code
47
+ * Producer}. this identifier is generated by producer.
48
+ */
49
+ void setMessageId (String messageId );
50
+
51
+ /**
52
+ * See {@link Header#setMessageId(String)}
53
+ *
54
+ * @return messageId
55
+ */
56
+ String getMessageId ();
27
57
}
You can’t perform that action at this time.
0 commit comments