Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Pulsar pool messages support in failure handlers #2584

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public PulsarContinue(String channel) {
public Uni<Void> handle(PulsarIncomingMessage<?> message, Throwable reason, Metadata metadata) {
log.messageFailureContinued(channel, reason.getMessage());
log.messageFailureFullCause(reason);
message.unwrap().release();
return Uni.createFrom().voidItem()
.emitOn(message::runOnMessageContext);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public Uni<Void> handle(PulsarIncomingMessage<?> message, Throwable reason, Meta
// We don't commit, we just fail and stop the client.
log.messageFailureFailStop(channel);
reportFailure.accept(reason, true);
message.unwrap().release();
return Uni.createFrom().<Void> failure(reason)
.emitOn(message::runOnMessageContext);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.smallrye.reactive.messaging.pulsar.ack;

import io.smallrye.reactive.messaging.test.common.config.MapBasedConfig;

public class PulsarAckPoolMessagesTest extends PulsarAckTest {

MapBasedConfig config() {
return super.config()
.with("mp.messaging.incoming.data.poolMessages", true);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.smallrye.reactive.messaging.pulsar.fault;

import io.smallrye.reactive.messaging.test.common.config.MapBasedConfig;

public class PulsarNackPoolMessagesTest extends PulsarNackTest {

MapBasedConfig config() {
return super.config()
.with("mp.messaging.incoming.data.poolMessages", true);
}

}
Loading