Skip to content

Commit 3e6f7de

Browse files
authoredMar 17, 2025··
[fix][broker] Avoid IllegalStateException when marker_type field is not set in publishing (#24087)
1 parent 0c109e8 commit 3e6f7de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ private void setContextPropsIfRepl(PublishContext publishContext, ByteBuf header
363363
// Message is coming from replication, we need to use the replication's producer name, ledger id and entry
364364
// id for the purpose of deduplication.
365365
MessageMetadata md = Commands.peekMessageMetadata(headersAndPayload, "Check-Deduplicate", -1);
366-
if (Markers.isReplicationMarker(md.getMarkerType())) {
366+
if (md != null && md.hasMarkerType() && Markers.isReplicationMarker(md.getMarkerType())) {
367367
publishContext.setProperty(MSG_PROP_IS_REPL_MARKER, "");
368368
}
369369
return;

0 commit comments

Comments
 (0)
Please sign in to comment.