apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
533 stars 205 forks source link

SR messaging channels not connected #3575

Closed deepakkapoor23 closed 2 months ago

deepakkapoor23 commented 2 months ago

Describe the bug

App fails to recognize incoming and outgoing channels configured in properties. This wasn't an issue in old kogito release version. This warning is also not seen in quarkus dev mode, but only when a jar is built and executed.

mp.messaging.incoming.itemupdate.connector=quarkus-http mp.messaging.incoming.itemupdate.path=/itemupdate

mp.messaging.outgoing.failureevent.connector=quarkus-http mp.messaging.outgoing.failureevent.url=https://somehost.com/v1/pushEvent

Expected behavior

No warning should be displayed at startup and configured incoming, outgoing channels should be ready to receive and emit events respectively.

Actual behavior

WARN [io.sma.rea.mes.provider] (main) SRMSG00207: Some components are not connected to either downstream consumers or upstream producers:

How to Reproduce?

No response

Output of uname -a or ver

Windows 11

Output of java -version

java 17

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

999-snapshot

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

gradle 8.6

Additional information

No response

fjtirado commented 2 months ago

@deepakkapoor23 I have tested https://github.com/apache/incubator-kie-kogito-examples/blob/stable/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/README.md on windows (similar scenario that the one you describe) and it is working fine.

C:\git\incubator-kie-kogito-examples\serverless-workflow-examples\serverless-workflow-consuming-events-over-http-quarkus\target>java -jar quarkus-app\quarkus-run.jar
__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2024-07-10 15:29:48,365 INFO  [org.kie.kog.add.qua.mes.com.QuarkusKogitoExtensionInitializer] (main) Registered Kogito CloudEvent extension
2024-07-10 15:29:48,397 INFO  [org.kie.kog.eve.imp.AbstractMessageConsumer] (main) Consumer for move started
2024-07-10 15:29:48,397 INFO  [org.kie.kog.eve.imp.AbstractMessageConsumer] (main) Consumer for start started
2024-07-10 15:29:48,567 INFO  [io.quarkus] (main) serverless-workflow-consuming-events-over-http-quarkus 1.0-SNAPSHOT on JVM (powered by Quarkus 3.8.4) started in 3.519s. Listening on: http://0.0.0.0:8080
2024-07-10 15:29:48,567 INFO  [io.quarkus] (main) Profile prod activated.
2024-07-10 15:29:48,567 INFO  [io.quarkus] (main) Installed features: [cache, cdi, jackson-jq, kie-addon-messaging-extension, kie-addon-process-management-extension, kie-addon-source-files-extension, kogito-serverless-workflow, qute, reactive-routes, resteasy, resteasy-client, resteasy-client-jackson, resteasy-jackson, security, security-properties-file, smallrye-context-propagation, smallrye-openapi, smallrye-reactive-messaging, smallrye-reactive-messaging-http, vertx]
2024-07-10 15:40:57,486 INFO  [org.kie.kog.eve.imp.ProcessEventDispatcher] (kogito-event-executor-1) Starting new process instance with signal 'start'
2024-07-10 15:40:57,686 INFO  [org.kie.kog.ser.wor.act.SysoutAction] (kogito-event-executor-1) [ "Hello!" ]

Therefore, we we need a reproducer to rule out something in your env or example that is causing this

deepakkapoor23 commented 2 months ago

@fjtirado did you try this on main or stable branch? I believe 999-snapshot is built from main?

deepakkapoor23 commented 2 months ago

@fjtirado This is again a gradle build issue. I tried the same example with both gradle and maven builds. Maven jar runs ok but gradle jar throws this warning and channels are disconnected. Can we please reopen this and have someone look at gradle build?

2024-07-10 16:29:07,814 WARN [io.sma.rea.mes.provider] (main) SRMSG00207: Some components are not connected to either downstream consumers or upstream producers:

deepakkapoor23 commented 2 months ago

@fjtirado @gitgabrio See a comparison of gradle vs maven builds for generated sources in this example. The gradle build has the entire kogito directory missing and hence has no controllers or emitters for messaging.

Gradle build output: image

Maven build output: image