Skip to content

Commit

Permalink
Merge branch 'main' into multiple-filter-subjects
Browse files Browse the repository at this point in the history
  • Loading branch information
scottf committed Sep 8, 2023
2 parents bf674ac + f107678 commit cb7411b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/io/nats/client/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
*
* <p>The byte[] returned by {@link #getData() getData()} is not shared with any library code
* and is safe to manipulate.
*
* NOTICE: This interface is intended only to be implemented internally,
* although since it is public it is technically available to anyone and
* breaking changes should be avoided. For instance:
* - Signatures should not be changed.
* - If methods are added, a default implementation should be provided.
*/
public interface Message {

Expand Down Expand Up @@ -156,5 +162,5 @@ public interface Message {
* Only applies to JetStream messages received from the server.
* @return the consumption byte count or -1 if the message implementation does not support this method
*/
long consumeByteCount();
default long consumeByteCount() { return -1; }
}

0 comments on commit cb7411b

Please sign in to comment.