-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
(InMemoryConnector) Sink does not receive message as per Kafka docs #19059
Comments
/cc @cescoffier |
cc @ozangunalp |
@chris-asl thanks for the reproducer, it helped a lot. I hear that this is very misleading, we need to explain this more in the documentation: The (very confusingly named) The @Incoming("order")
@Outgoing("order-sink")
Order consume(Order order) {
System.out.println("Order received " + order.getFood());
return order;
} It is for the same reason that the A side note: Kafka dev service creates an in-container Kafka broker for the tests. It spins up fast and is configured by default. Hope this helps. |
I see, this makes it much more clearer (the independent part). I believe the independent clarification along with the processor component, should be also added to the documentation. |
@chris-asl Yes! That would be awesome! |
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 withHow to Reproduce?
Here's a link to a reproducer:
https://github.com/chris-asl/quarkus-reactive-messaging-inmemory
I've included two tests:
InMemoryConnectorTest
follows the Kafka documentation code but fails, run with./mvnw clean test -Dtest=InMemoryConnectorTest
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
orver
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
orgradlew --version
)Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Additional information
No response
The text was updated successfully, but these errors were encountered: