All Projects → hazelcast → quarkus-hazelcast-client

hazelcast / quarkus-hazelcast-client

Licence: other
Quarkus Hazelcast Client Extension

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to quarkus-hazelcast-client

Trotsky
a cloud native ✏️ blog platform 一个正在开发中的云原生笔记平台
Stars: ✭ 27 (-30.77%)
Mutual labels:  quarkus
native-java-examples
Native Java Apps with Micronaut, Quarkus, and Spring Boot
Stars: ✭ 44 (+12.82%)
Mutual labels:  quarkus
microprofile-samples
Showcases typical use cases of Quarkus Applications
Stars: ✭ 27 (-30.77%)
Mutual labels:  quarkus
Certified-Rancher-Operator-Thai
มาเรียนรู้ Kuberntes แบบ On-Premise และ Architecture ของ Rancher ที่ใช้ในการจัดการ Kubernetes Cluster เพื่อนำสู่ Certified Kubernetes Administrator และ Certified Rancer Operator
Stars: ✭ 78 (+100%)
Mutual labels:  quarkus
quarkus-workshops
Hosts Quarkus related workshops
Stars: ✭ 135 (+246.15%)
Mutual labels:  quarkus
quarkiverse
Repository for contributing to quarkiverse wiki
Stars: ✭ 29 (-25.64%)
Mutual labels:  quarkus
heterogeneous-microservices
Implementation of the same simple microservice on different frameworks
Stars: ✭ 43 (+10.26%)
Mutual labels:  quarkus
kanban-quarkus
Projeto Kanban Board
Stars: ✭ 20 (-48.72%)
Mutual labels:  quarkus
nxrocks
Set of Nx plugins to enhance your Nx workspace (even more!)
Stars: ✭ 165 (+323.08%)
Mutual labels:  quarkus
harry-potter-quarkus
Showcases in a web application Quarkus and Infinispan
Stars: ✭ 16 (-58.97%)
Mutual labels:  quarkus
quarkus-amazon-lambda
A simple demo application showing quarkus usage with Amazon Lambdas
Stars: ✭ 22 (-43.59%)
Mutual labels:  quarkus
quarkus-resteasy-problem
Unified error responses for Quarkus REST APIs via Problem Details for HTTP APIs (RFC7807). Supports Quarkus 2.0+ and 1.4+
Stars: ✭ 36 (-7.69%)
Mutual labels:  quarkus
base-starter-flow-quarkus
A project base/example for using Vaadin with Quarkus
Stars: ✭ 23 (-41.03%)
Mutual labels:  quarkus
opta-invest
Spring Boot/Quarkus/Micronaut + Optaplanner Portfolio Optimization
Stars: ✭ 21 (-46.15%)
Mutual labels:  quarkus
quarkus-performance
Comparing the CPU/Memory utilisation - Quarkus via GraalVM Native Image vs. Quarkus via Java Runtime vs. Payara-Micro via Java Runtime.
Stars: ✭ 49 (+25.64%)
Mutual labels:  quarkus
optaplanner-quickstarts
OptaPlanner quick starts for AI optimization: many use cases shown in many different technologies.
Stars: ✭ 226 (+479.49%)
Mutual labels:  quarkus
graphql-example
A MicroProfile GraphQL Example
Stars: ✭ 44 (+12.82%)
Mutual labels:  quarkus
chuck-norris-streams
Kafka, Debezium and Fuse demonstration based on Chuck Norris movies!
Stars: ✭ 25 (-35.9%)
Mutual labels:  quarkus
camel-quarkus-examples
Apache Camel Quarkus Examples
Stars: ✭ 37 (-5.13%)
Mutual labels:  quarkus
examples
Example code for the Quarkus for Spring Developers eBook
Stars: ✭ 22 (-43.59%)
Mutual labels:  quarkus

Hazelcast Client for Quarkus

GitHub Actions status Maven Central

Hazelcast IMDG is a distributed in-memory object store and compute engine that supports a wide variety of data structures such as Map, Set, List, MultiMap, RingBuffer, HyperLogLog.

Use Hazelcast IMDG to store your data in RAM, spread and replicate it across a cluster of machines, and perform data-local computation on it.

Hazelcast is:

  • cloud and Kubernetes friendly
  • often used as a Distributed Cache amongst other use cases

See the official guide here.

Features

  • The HazelcastInstance bean is initialized lazily by Quarkus, if you want eager initialization, make sure to double-check Quarkus Documentation.

Configuration

After configuring quarkus-universe BOM:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-universe-bom</artifactId>
            <version>${insert.newest.quarkus.version.here}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

You can just configure the hazelcast-client extension by adding the following dependency:

<dependency>
    <groupId>com.hazelcast</groupId>
    <artifactId>quarkus-hazelcast-client</artifactId>
</dependency>

NOTE: You can bootstrap a new application quickly by using code.quarkus.io and choosing quarkus-hazelcast-client

Quarkus hazelcast-client configuration

The extension exposes a single native-mode-compatible Hazelcast Client bean (HazelcastInstance) which can be directly injected into your beans:

private final HazelcastInstance hazelcastInstance;

public UsersService(HazelcastInstance hazelcastInstance) {
    this.hazelcastInstance = hazelcastInstance;
}

By default, client will try to connect to a Hazelcast instance running on the host using port 5701.

Defaults can be customized using application.properties entries such as:

quarkus.hazelcast-client.cluster-members
quarkus.hazelcast-client.outbound-port-definitions
quarkus.hazelcast-client.outbound-ports
quarkus.hazelcast-client.cluster-name
quarkus.hazelcast-client.labels
quarkus.hazelcast-client.connection-timeout

For example:

quarkus.hazelcast-client.cluster-members=localhost:5701

If you don't provide a port number, Hazelcast Client will try to autodetect it:

quarkus.hazelcast-client.cluster-members=localhost

You can also pass a comma-separate list of values as a single entry:

quarkus.hazelcast-client.cluster-members=localhost:5701,localhost:5702

If you need more, use a standard hazelcast-client.yml/hazelcast-client.xml-based configuration (described below) or wire-up your own HazelcastInstance bean.

Keep in mind that you will still be able to benefit from GraalVM compatibility!

Configuration Files

Configuration using hazelcast-client.yml or hazelcast-client.xml

In order to configure the client using the hazelcast-client.yml/hazelcast-client.xml file, place the configuration file in the src/main/resources directory.

Keep in mind that configuration entries from hazelcast-client.yml/xml are overridden by quarkus.hazelcast-client.* entries so it's a good idea to stick to one of these exclusively.

Testing

To make testing simple, the extension provides the HazelcastServerTestResource which automatically launches an embedded Hazelcast instance with defaults settings and manages its lifecycle:

 @QuarkusTest
 @QuarkusTestResource(HazelcastServerTestResource.class)
 public class HazelcastAwareTest {

     @Test
     public void test() {
         // you can safely call embedded Hazelcast instance from here
     }
 }

Maven dependency:

<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-test-hazelcast</artifactId>
    <scope>test</scope>
</dependency>

Compatibility Matrix

  • 1.0.x is compatible with Quarkus 1.6.x-1.7.x (no longer maintained)
  • 1.1.1 is compatible with Quarkus 1.8.x+ and Hazelcast 4.0.x and 4.1.x
  • 1.2.0 is compatible with Quarkus 1.13.x+ and Hazelcast 4.x

Limitations (native mode)

There's no support for:

  • Default Java serialization
  • User code deployment
  • Hazelcast SPI support on OSGi
  • JCache integration
  • JMX
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].