We’re excited to announce the General Availability (GA) of the Couchbase Quarkus SDK 1.0, now officially ready for production use! This release brings native integration with the Quarkus framework, enhancing developer productivity and application performance. A standout feature of this release is support for GraalVM native image generation, enabling ultrafast startup times and optimized runtime performance.

What’s New in Couchbase Quarkus SDK 1.0?

The new quarkus-couchbase extension integrates our existing Java SDK into Quarkus’ ecosystem. It produces a Cluster object easily accessible with Quarkus’ ArC dependency injection framework, and adds GraalVM compatibility to run the Java SDK as a native executable on any platform.

Seamless GraalVM Native Image Support:

    • Ultra-fast startup times and reduced memory footprint
    • Ideal for cloud-native and serverless environments

Effortless Integration with Quarkus:

    • Built-in dependency injection for Cluster injection
    • Reactive and imperative APIs for flexible development
    • Simplified configuration for connectivity
    • Micrometer metrics, SmallRye health checks

Open Source Collaboration:

Get Started with Couchbase Quarkus SDK

1. Create a new application

We recommend creating a Quarkus app with the Couchbase Extension via code.quarkus.io. The link will automatically add the Couchbase and REST Quarkus extensions and generate a new sample application.

If you already have an application on hand, add Couchbase as a dependency:

1.1. Add the Dependency

Maven

Gradle

2. Configure Your Application

Add your connection string and credentials in application.properties located at src/main/resources/application.properties:

The extension automatically starts a TestContainer, which can be disabled if desired with:

Remember to head to the Couchbase Cluster UI at http://localhost:8091 and create a Bucket named default if you’re using DevServices.

3. Injecting the Cluster

The Quarkus Couchbase extension produces a Cluster bean that can be injected using the  @Inject annotation.

From there, its usage is the same as it would be with the normal Java SDK.

4. Example: Creating an HTTP GET Endpoint

Modify the code in src/main/java/org/acme/GreetingResource.java:

5. Example: Performing KV Operations

Use the same KV API as in the normal Java SDK:

Running your application

Run in dev mode with:

And head to the Developer UI at http://localhost:8080/q/dev-ui/welcome.

Or compile to a native executable:

The native-image will be located in the target directory of your module.

Why Choose Couchbase Quarkus SDK 1.0?

    • Performance: GraalVM native images provide unparalleled speed and efficiency.
    • Flexibility: Seamless integration with Quarkus simplifies development workflows.
    • Scalability: Couchbase’s rich feature set supports applications at any scale.

Ready to Build?

Start building blazing-fast, cloud-native applications today! Explore the Couchbase Quarkus SDK GitHub Repository for more resources, contribute to the project, and share your feedback.

Let’s redefine application performance and developer productivity—together!

Community and Support

We believe in the power of community and open-source development. The Quarkus SDK for Couchbase is open-source, and we encourage you to contribute, provide feedback, and join the conversation. For support, if you are our enterprise licensed customer, you can reach out via support, otherwise, you can access our comprehensive documentation, join the Couchbase Forums or Couchbase Discord, or reach out via our support portal.

Further Reading

To learn more, check out our documentation website. It goes into more detail on the API, especially around transactions and asynchronous operations and provides other reference material and sample bindings links for you to dig deeper:

Supported operating systems and compatibility requirements are listed on our documentation website.

Happy coding!

The Couchbase Team



Author

Posted by Emilien Bevierre - Software Engineer

Leave a reply