payara / ecosystem-support

Placeholder repository to handle community requests for the Payara Platform ecosystem tools
3 stars 2 forks source link

Long initialisation time for Kafka Resource adapter (kafka-rar-0.8.0 on Payara Micro 5.2022.5) #70

Closed helmchen closed 1 year ago

helmchen commented 1 year ago

Brief Summary

Deployment and initialisation of the Kafka resource adapter on Payara Micro needs much more time than expected.

I have a Java EE application which should write data to a Kafka topic. After adding the Kafka resource adapter to the deployment, startup time of Payara Micro exceeds (Without even using the adapter).

The app is built as uber jar, using payara-micro-maven-plugin in version 1.4.0

  ...
  <properties>
      <!-- Baseline Payara -->
      <javaee.version>8.0</javaee.version>
      <payara.version>5.2022.5</payara.version>
      <eclipse-microprofile.version>4.1</eclipse-microprofile.version>      
      <payara-kafka-connector.version>0.8.0</payara-kafka-connector.version> <!-- last version for Java EE -->
      <payara-micro-maven-plugin.version>1.4.0</payara-micro-maven-plugin.version> <!-- last version for Payara 5? -->
  </properties>
  ...
  <plugin>
      <groupId>fish.payara.maven.plugins</groupId>
      <artifactId>payara-micro-maven-plugin</artifactId>
      <version>${payara-micro-maven-plugin.version}</version>
      <executions>
          <execution>
              <id>buildUberJar</id>
              <phase>install</phase>
              <goals>
                  <goal>bundle</goal>
              </goals>
           </execution>
      </executions>
      <configuration>
          <autoDeployArtifact>true</autoDeployArtifact>
          <appendSystemProperties>false</appendSystemProperties>
          <payaraVersion>${payara.version}</payaraVersion>
          <useUberJar>true</useUberJar>
          <deployArtifacts>
              <deployArtifact>
                  <groupId>fish.payara.cloud.connectors.kafka</groupId>
                  <artifactId>kafka-rar</artifactId>
                  <version>${payara-kafka-connector.version}</version>
                  <type>rar</type>
               </deployArtifact>
          </deployArtifacts>
          <customJars>
              <!-- Contains a jar containing packed system libraries and config for logging and JDBC -->
          </customJars>
      </configuration>
  </plugin>

Expected Outcome

Shorter startup time

Current Outcome

According to the logs initialisation takes more than 2 minutes:

[2023-06-16T10:03:12.541+0200] [] [INFORMATION] [] [fish.payara.boot.runtime.BootCommand] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1686902592541] [levelValue: 800] Boot Command list-jdbc-connection-pools returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: list-jdbc-connection-pools AdminCommandnull
    H2Pool

[2023-06-16T10:05:23.874+0200] [] [INFORMATION] [] [fish.payara.cloud.connectors.kafka.inbound.KafkaResourceAdapter] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1686902723874] [levelValue: 800] Kafka Resource Adapter Started..

[2023-06-16T10:05:24.119+0200] [] [INFORMATION] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1686902724119] [levelValue: 800] kafka-rar-0.8.0 was successfully deployed in 131'391 milliseconds.

Reproducer

Operating System

Windows 10 Enterprise

JDK Version

Temurin-17.0.7+7

Ecosystem Tool

Cloud Connectors

Elifzeynepedman commented 1 year ago

Greetings @helmchen,

Payara Platform 5 Community support has ended, please migrate your environment to Payara Platform 6 and verify if this issue affects its current release.

If you encounter any issues or have trouble transforming your applications and migrating them to Payara Platform 6 and if you want to remain on Payara Platform 5, you may consider acquiring a Payara Enterprise subscription.

Thank you, Elif

helmchen commented 1 year ago

Hi @Elifzeynepedman

Unfortunately I have some libraries which I share with some legacy applications that currently can not be migrated to Jakakarta EE.

I'll stay on kafka-rar.0.7.0 on Payara Micro 5.x for the moment which works fine and consider subscribing to Payara Enterprise if I run into troubles with this constellation.