question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(InMemoryConnector) Sink does not receive message as per Kafka docs

See original GitHub issue

Describe the bug

I’m testing reactive messaging using a Kafka connector.

I want to test with the InMemoryConnector as provided by SmallRye, here and outlined in the related guide on the Testing without a broker section.

FYI @el10686

Expected behavior

The message should be received by the InMemorySink.

Actual behavior

The message is not received at all.

Running the test with ./mvnw clean test -Dtest=InMemoryConnectorTest and awaitility condition check times out with

[ERROR] org.acme.InMemoryConnectorTest.test  Time elapsed: 10.696 s  <<< ERROR!
org.awaitility.core.ConditionTimeoutException: Lambda expression in org.acme.InMemoryConnectorTest that uses io.smallrye.reactive.messaging.connectors.InMemorySink: expected the predicate to return <true> but it returned <false> for input of <[]> within 10 seconds.
	at org.acme.InMemoryConnectorTest.test(InMemoryConnectorTest.java:36)

How to Reproduce?

Here’s a link to a reproducer:
https://github.com/chris-asl/quarkus-reactive-messaging-inmemory

I’ve included two tests:

  1. InMemoryConnectorTest follows the Kafka documentation code but fails, run with ./mvnw clean test -Dtest=InMemoryConnectorTest
  2. InMemoryProducerConsumerTest uses the in memory connector (and passes) but decouples testing of the two components (Consumer, Producer), run with ./mvnw clean test -Dtest=InMemoryProducerConsumerTest

Output of uname -a or ver

Linux homer 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

GraalVM version (if different from Java)

NA

Quarkus version or git rev

2.0.3.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
geoandcommented, Jul 29, 2021
0reactions
cescoffiercommented, Aug 16, 2021

@chris-asl Yes! That would be awesome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Kafka Reference Guide - Quarkus
Connectors are configured to map incoming messages to a specific channel (consumed by the application) and collect outgoing messages sent to a specific...
Read more >
Monitoring Kafka Connect and Connectors
While a sink connector is paused, Connect will stop pushing new messages to it. The pause state is persistent, so even if you...
Read more >
Quarkus - SmallRye Reactive Messages: InMemoryConnector ...
This answer is not useful. Save this answer. Show activity on this post. The problem was with the pom dependencies.
Read more >
Testing without brokers - SmallRye Reactive Messaging
This in-memory connector provides a way to send messages to incoming channels, or check the received messages for outgoing channels. To use the...
Read more >
Kafka | Vector documentation
Publish observability event data to Apache Kafka topics. ... Data that has been synchronized to disk will not be lost if Vector is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found