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

MP Reactive Messaging: NullPointerException during Kafka partition rebalance #23017

Closed
Azquelt opened this issue Oct 19, 2022 · 0 comments · Fixed by #22999
Closed

MP Reactive Messaging: NullPointerException during Kafka partition rebalance #23017

Azquelt opened this issue Oct 19, 2022 · 0 comments · Fixed by #22999
Assignees
Labels
release bug This bug is present in a released version of Open Liberty release:220012

Comments

@Azquelt
Copy link
Member

Azquelt commented Oct 19, 2022

Describe the bug

During partition reassignment, it's possible for the Kafka connector for MicroProfile Reactive Messaging to not update its internal state correctly, resulting in it stopping receiving messages and a NullPointerException being logged.

The following log messages may be seen:

java.lang.NullPointerException
	at com.ibm.ws.microprofile.reactive.messaging.kafka.KafkaInput.lambda$wrapInMessageStream$10(KafkaInput.java:274)
	at com.ibm.ws.microprofile.reactive.messaging.kafka.KafkaInput$$Lambda$476/0x00000000c2be7230.test(Unknown Source)
	at io.smallrye.reactive.streams.stages.FilterStageFactory$$Lambda$481/0x00000000c3268d30.test(Unknown Source)
User provided listener com.ibm.ws.microprofile.reactive.messaging.kafka.adapter.impl.ConsumerRebalanceListenerImpl failed on invocation of onPartitionsRevoked for partitions [live-partition-test-in-0]
java.lang.NullPointerException
	at com.ibm.ws.microprofile.reactive.messaging.kafka.KafkaInput.onPartitionsRevoked(KafkaInput.java:346)
	at com.ibm.ws.microprofile.reactive.messaging.kafka.adapter.impl.ConsumerRebalanceListenerImpl.onPartitionsRevoked(ConsumerRebalanceListenerImpl.java:55)
	at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.invokePartitionsRevoked(ConsumerCoordinator.java:315)

Steps to Reproduce
This is hard to reproduce deliberately but is occurring occasionally in our automated tests. It requires that something calls KafkaConsumer.wakeup() while KafkaInput.onPartitionsAssigned() is calling KafkaConsumer.position().

Expected behavior
The partition assignment should succeed correctly and without the above errors.

Diagnostic information:

  • OpenLiberty Version: all versions
  • Affected feature(s): mpReactiveMessaging-1.0

Additional context

For RTC 290930

@Azquelt Azquelt added the release bug This bug is present in a released version of Open Liberty label Oct 19, 2022
@Azquelt Azquelt self-assigned this Oct 19, 2022
@Azquelt Azquelt added this to Backlog in MicroProfile UK via automation Oct 19, 2022
@Azquelt Azquelt moved this from Backlog to In Progress in MicroProfile UK Oct 19, 2022
MicroProfile UK automation moved this from In Progress to Done Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty release:220012
Projects
Development

Successfully merging a pull request may close this issue.

2 participants