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

Wildfly mp messaging: Pause Consuming of messages #655

Open
h2mch opened this issue Sep 19, 2024 · 3 comments
Open

Wildfly mp messaging: Pause Consuming of messages #655

h2mch opened this issue Sep 19, 2024 · 3 comments

Comments

@h2mch
Copy link

h2mch commented Sep 19, 2024

I'm using the smallrye-reactive-messaging (kafka) extension within wildfly

  /extension=org.wildfly.extension.microprofile.reactive-messaging-smallrye:add
  /extension=org.wildfly.extension.microprofile.reactive-streams-operators-smallrye:add

I can successfully consume messages within the application.

@ApplicationScoped
public class KafkaMessageConsumer {
//...
    @Incoming("consumerdata")
    public void consume(ConsumerRecord<String, String> message) {
        logger.debug("consume message with key {}", message.key());
        //...
    }
// ...
}

The application is running on multiple nodes. Is there a way to pause the consuming, so that only other nodes are consuming the messages without shutdown the application?

I tried something with:

    @Inject
    @Connector("smallrye-kafka")
    KafkaConnector kafkaConnector;
//...
                kafkaConsumer.pause().await().atMost(Duration.ofMillis(1_000));
// and
                kafkaConsumer.resume().await().atMost(Duration.ofMillis(1_000));

with the property pause-if-no-requests set to false. but this cause the full consuming group to pause.

@bstansberry
Copy link
Contributor

Hi @h2mch,

I suggest you start a thread on the user forum at #655. We use this repo to track work on the wildfly.org website itself, so it's unlikely people who can answer your question will see it. (I can't answer it.)

Best regards,
Brian

@h2mch
Copy link
Author

h2mch commented Oct 15, 2024

thx for the hint.

@bstansberry
Copy link
Contributor

Sorry, @h2mch it wasn't a very good hint as I posted a wrong link to the forum. It's

https://groups.google.com/g/wildfly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants