Quarkus Interview Questions (2022)

Here is a list of Quarkus Interview questions that might help you to nail a Quarkus Job or simply to test your knowledge of Supersonic Java applications!

Quarkus basic interview questions

What is Quarkus?

Quarkus is a full-stack native Java Kubernetes framework built for Java virtual machines (JVMs) and native compilation. The framework optimizes Java specifically for containers, turning it into an efficient platform for serverless, cloud, and Kubernetes environments.

Do you need GraalVM to run Quarkus?

Quarkus is firstly a Java framework. Therefore, you can develop, package and run Quarkus applications with a compatible JDK. This is the JVM mode.

By using GraalVM you can compile your Java application into machine specific code. The output of this process is a native application.

What would you use/recommend to bootstrap a Quarkus application?

There are many options available. If you are building prototypes/quickstarts then you can just use the Online tool, which gives you insight about stability of each extension plus several adds-on. For your projects, I’d use the plugin available for your IDE (e.g. Visual Studio/ IntelliJ Idea, etc). On the other hand, the Maven and the CLI are both flexible options and you can use it as default option if you prefer.

Why Quarkus applications are so fast at start up?

A standard Java application performs bootstrapping during the runtime. This requires a lot of steps like loading libraries and configuration files, Classpath scanning, configuring the Dependency Injection and so on. Quarkus, on the other hand, uses Ahead of Time (AOT) compilation and aggressive optimizations like classpath scanning, configuration reloading, and application bootstrap during the build process. This results in impressive startup performance.

Quarkus development

Can you use other JVM languages to build Quarkus applications?

Yes you can use Kotlin by including its extension in your project. At the time of writing, Kotlin is experimental on Quarkus.

What is the difference between Hibernate and Panache?

Panache simplifies the development of Hibernate ORM applications by eliminating boiler plate code which you have to include in a JPA/Hibernate application. To use Panache, you only have to extend the PanacheEntity class in your Entity and access Entity fields directly:

@Entity
public class Customer extends PanacheEntity {

    public String firstName;
    public String lastName;

}

How do you build a Container image of your Quarkus applications?

When you bootstrap a Quarkus application (whatever tool you use), you automatically get a set of Dockerfiles which you can use it to build JVM or native container images. You can use the docker or podman command to build and run your Container image.

How to deploy a Quarkus application on OpenShift?

The simplest way to do that, is to include the openshift extension in your project and to build your project with the option “-Dquarkus.kubernetes.deploy=true”

What does it mean to unify imperative and reactive programming?

In a nutshell, it means you can use two different paradigms in your applications. Business operations, which are inherently synchronous, therefore they use an imperative paradigm.

At the same time, you can dispatch the results of this business operations using asynchronous and event driven code. You can you Reactive programming in Quarkus to achieve that.

Migration interview questions

Do you think it’s easier to migrate a Spring Boot application or a Java EE application to Quarkus?

This depends a lot on how you have written your applications. In general terms, Quarkus applications use best of breed of Java EE modules. Therefore, the migration should be easier, especially if you rely on a REST/JPA paradigm. On the other hand, Spring Boot relies on a different set of libraries (wrapped by starters) therefore you might need to adapt a larger part of your code. However, SpringBoot applications written according to the Microservices design principles, are conceptually a good match for Quarkus. Java EE applications, instead, when designed with a Monolithic style, require to be broken in smaller services, with low resources footprint.

How do you plan a migration from Java EE to Quarkus?

Firstly, we need to check which Java EE / Jakarta EE components are included in your application and replace them with Quarkus extensions. For example, EJBs are not available in Quarkus and should be replaced by CDI Beans. SOAP Web Services don’t have an equivalent in Quarkus and JSF on Quarkus is experimental. Next step is to check all configuration options of your Enterprise application which you need to migrate to Microprofile style configuration. Finally, to build your applications, you also need to switch your “javax” modules to the equivalent “io.quarkus”.

My application uses EJB Timers. How can I possibly migrate this feature to Quarkus?

As said, EJBs are not available in Quarkus runtime. You can however migrate them to Scheduled Tasks which also support the execution of cron-expressions to run your tasks. Quarkus Scheduled tasks don’t have an equivalent persistent/clustered option like EJB timers do though.

Recommended Reading: To learn more about Quarkus, check our Quarkus Index.

Found the article helpful? if so please follow us on Socials