From 72c9eb38d5899adab415f60dbeedcc36370c3c9d Mon Sep 17 00:00:00 2001 From: Kamil Chociej Date: Thu, 18 Jul 2024 10:16:55 +0200 Subject: [PATCH] #2698 Fix: Pulsar - Out of direct memory leak in PulsarNack while pool message enabled --- .../io/smallrye/reactive/messaging/pulsar/fault/PulsarNack.java | 1 + 1 file changed, 1 insertion(+) diff --git a/smallrye-reactive-messaging-pulsar/src/main/java/io/smallrye/reactive/messaging/pulsar/fault/PulsarNack.java b/smallrye-reactive-messaging-pulsar/src/main/java/io/smallrye/reactive/messaging/pulsar/fault/PulsarNack.java index 8eff893313..97a0171849 100644 --- a/smallrye-reactive-messaging-pulsar/src/main/java/io/smallrye/reactive/messaging/pulsar/fault/PulsarNack.java +++ b/smallrye-reactive-messaging-pulsar/src/main/java/io/smallrye/reactive/messaging/pulsar/fault/PulsarNack.java @@ -45,6 +45,7 @@ public Uni handle(PulsarIncomingMessage message, Throwable reason, Meta consumer.negativeAcknowledge(message.getMessageId()); log.messageFailureNacked(channel, reason.getMessage()); log.messageFailureFullCause(reason); + message.unwrap().release(); return Uni.createFrom().voidItem() .emitOn(message::runOnMessageContext); }