Edit this Page

Infinispan Client Extension Reference Guide

Infinispan is a distributed, in-memory key/value store that provides Quarkus applications with a highly configurable and independently scalable data layer. This extension gives you client functionality that connects applications running on Quarkus with remote Infinispan clusters. To get started with Infinispan, we recommend:

  1. Following the Get Started Tutorial (5 minutes).

  2. Running the remote cache simple code tutorials.

Learn more in the Infinispan documentation.

Installation

Run the following command in the base directory of your Quarkus project to add the infinispan-client extension:

CLI
quarkus extension add infinispan-client
Maven
./mvnw quarkus:add-extension -Dextensions='infinispan-client'
Gradle
./gradlew addExtension --extensions='infinispan-client'

This command adds the following dependency to your build file:

pom.xml
<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-infinispan-client</artifactId>
</dependency>
build.gradle
implementation 'io.quarkus:quarkus-infinispan-client'
annotationProcessor 'org.infinispan.protostream:protostream-processor:{infinispan-protostream-version}' (1)
1 Mandatory in the Gradle build to enable the generation of the files in the annotation based serialization

Connection to Infinispan

Running the server

You need at least one running instance of the Infinispan Server.

Development mode

If you are running a Docker instance, you can use Infinispan Dev Services and connect without configuration.

If you want to run the server yourself using Docker, check out the 5-minute Getting stated with Infinispan tutorial to run Infinispan Server

You can also download ${infinispan.version} Server bare metal distribution and run the following command from the distribution folder.

$ ./bin/server.sh

Infinispan Server enables authentication and security authorization by default, so you need to create a user with permissions.

  • If you run the Infinispan Server image, pass the USER="admin" and PASS="password" parameters.

  • If you run the bare metal distribution, use the Command Line Interface (CLI) as follows:

    $ ./bin/cli.sh user create admin -p password
Production mode

In Kubernetes, we recommend the Infinispan Operator. Additionally, grab a look to the Cross Site Replication tutorial. You will learn how to run two separate Infinispan Clusters with docker compose (for local dev) and the Operator.

Configuring the connection

If you are running an Infinispan Server, add the following properties to connect in the application.properties file in the src/main/resources directory.

quarkus.infinispan-client.hosts=localhost:11222 (1)

quarkus.infinispan-client.username=admin (2)
quarkus.infinispan-client.password=password (3)
1 Sets Infinispan Server address list, separated with commas
2 Sets the authentication username
3 Sets the authentication password

Alternatively, you can use uri connection by providing a single connection property

quarkus.infinispan-client.uri=hotrod://admin:password@localhost:11222 (1)
1 Sets Infinispan URI connection. The following properties will be ignored: hosts, username and password.

Use Infinispan Dev Services to run a server and connect without configuration.

Client intelligence

Infinispan client uses intelligence mechanisms to efficiently send requests to Infinispan Server clusters. By default, the HASH_DISTRIBUTION_AWARE intelligence mechanism is enabled. However, locally with Docker for Mac, you might experience connectivity issues. In this case, configure the client intelligence to BASIC.

Learn more in the Infinispan documentation.

quarkus.infinispan-client.client-intelligence=BASIC (1)
1 Docker for Mac workaround.

Don’t use BASIC in production environments by default, performance might be impacted.

Configuring backup clusters in Cross-Site Replication

In High Availability production deployments, it is common to have multiple Infinispan Clusters that are distributed across various Data Centers worldwide. Infinispan offers the capability to connect these clusters and configure backups between them. This enables seamless switching between clusters through both automated and manual methods using a single connection. To achieve this, it is necessary to configure the client to direct to the backup clusters.

quarkus.infinispan-client.hosts=host1:11222,host2:3122 (1)
quarkus.infinispan-client.username=admin
quarkus.infinispan-client.password=password
quarkus.infinispan-client.backup-cluster.nyc-site.hosts=nyc1:11222,nyc2:21222,nyc3:31222 (2)
quarkus.infinispan-client.backup-cluster.nyc-site.client-intelligence=BASIC (3)
quarkus.infinispan-client.backup-cluster.lon-site.hosts=lon1:11222,lon2:21222,lon3:31222 (4)
1 Sets Infinispan Server address list, separated with commas. This is the default cluster.
2 Configures a backup site 'nyc-site' with the provided address list
3 Configures a backup site 'nyc-site' with the provided client intelligence
4 Configures an additional backup site 'lon-site' with the provided address list

Based on the provided configuration, in the event of the default cluster becoming unavailable, the client will seamlessly transition to one of the accessible backup clusters. Additionally, there is also the option to manually switch the client to an alternate cluster:

@ApplicationScoped
public class InfinispanExample {
    @Inject
    RemoteCacheManager cacheManager;

    public void doSomething() {
       cacheManager.switchToCluster("nyc-site"); (1)
       cacheManager.switchToCluster("lon-site"); (2)
       cacheManager.switchToDefaultCluster(); (3)
    }
}
1 The client connects to the 'nyc-site'.
2 The client connects to the 'lon-site'.
3 The client connects to the default site.

By default, Protobuf Schemas will also be uploaded to the backup clusters. However, it might be required to handle the registration manually as a schema may evolve over time when used in production, so you can disable this from occurring in each backup site by configuring the quarkus.infinispan-client.backup-cluster.YOUR_SITE_NAME.use-schema-registration to false. The value of this property will be ignored if the use-schema-registration global property is false.

Cross-site replication is a powerful feature offered by Infinispan that facilitates data backup between clusters situated in geographically diverse data centers, even spanning across various cloud providers. Learn more in the Infinispan documentation.

Default and named connections

This extension lets you configure a default Infinispan client connections and named ones. Named connections are essential to connect to multiple Infinispan clusters.

The default connection is configured using the quarkus.infinispan-client.* properties as seen above. When using the default connection, you can inject using a plain @Inject:

Named clients are configured using the quarkus.infinispan-client.<name>.* properties:

quarkus.infinispan-client.site-lon.hosts=localhost:11222
quarkus.infinispan-client.site-lon.username=admin
quarkus.infinispan-client.site-lon.password=password

quarkus.infinispan-client.site-nyc.hosts=localhost:31222
quarkus.infinispan-client.site-nyc.username=admin
quarkus.infinispan-client.site-nyc.password=password

Use the @InfinispanClientName qualifier with dependency injection:

@ApplicationScoped
public class InfinispanExample {
    @Inject
    @InfinispanClientName("site-lon")
    RemoteCacheManager rcmLon;

    @Inject
    @InfinispanClientName("site-nyc")
    RemoteCacheManager rmcNyc;
}

Infinispan Health Check

If you are using the quarkus-smallrye-health extension, the Infinispan client extensions will automatically add a readiness health check to validate the connection.

When you access the /q/health/ready endpoint of your application you will have information about the server connection and available caches.

This behavior can be disabled via the property quarkus.infinispan-client.health.enabled.

Tracing with OpenTelemetry

Infinispan supports instrumentation of the server via OpenTelemetry. Having the quarkus-opentelemetry extension will propagate the traces from the Infinispan Client to the Server. This behavior can be disabled via the property quarkus.infinispan-client.tracing.propagation.enabled

Creating caches from the client

When a cache is accessed from the client, if the cache does not exist in the Infinispan Server and you want to create it on first access, use one of the following properties:

quarkus.infinispan-client.cache.magazine.configuration=<distributed-cache><encoding media-type="application/x-protostream"/></distributed-cache> (1)
quarkus.infinispan-client.cache.books.configuration-resource=booksDistributedCache.json (2)
quarkus.infinispan-client.cache.authors.configuration-uri=/file/authorsIndexedCache.yaml (3)
1 The configuration in xml of the 'magazine' (yaml and json are also supported)
2 The file name located under the resources folder that contains the configuration of the 'books' cache
3 A provided file URI. The file URI can also be a file under resources

If configuration-resource, configuration and configuration-uri are configured for the same cache with the same Quarkus profile, configuration-uri gets the highest preference, over configuration-resource and configuration. configuration-resource gets preference over configuration.

The configuration-resource is build time property and the file will be included in the native build automatically. configuration-uri can also point to a file under the resources folder. However, the file won’t be automatically included in the native executable, unless you configure the property quarkus.native.resources.includes.

Cache configuration can be provided in XML, JSON or YAML. Use the Infinispan Console and the cache configuration Wizard to learn more about Infinispan Caches and create guided configurations.

If nothing is configured for a particular cache, it will be created with the following basic configuration:

XML
<distributed-cache>
    <encoding media-type="application/x-protostream"/>
</distributed-cache>
JSON
{
    "distributed-cache": {
        "encoding": {
            "media-type": "application/x-protostream"
        }
    }
}
YAML
distributedCache:
  encoding:
    mediaType: "application/x-protostream"

Authentication mechanisms

You can use the following authentication mechanisms with the Infinispan client:

  • DIGEST-MD5

  • PLAIN (recommended only in combination with TLS encryption)

  • EXTERNAL

Other authentication mechanisms, such as SCRAM and GSSAPI, are not yet verified with the Infinispan client.

You can find more information on configuring authentication in Hot Rod Endpoint Authentication Mechanisms.

You must configure authentication in the hotrod-client.properties file if you use Dependency Injection.

Serialization (Key Value types support)

By default, the client will support keys and values of the following types: byte[], primitive wrappers (e.g. Integer, Long, Double), String, Date and Instant. User types require some additional steps that are detailed here. Let’s say we have the following user classes:

Author.java
public record Author(String name, String surname) {
}
Book.java
public record Book(String title,
                   String description,
                   int publicationYear,
                   Set<Author> authors,
                   Type bookType,
                   BigDecimal price) {
}

Serialization of user types uses a library based on protobuf, called Protostream.

Infinispan caches can store keys and values in different encodings, but recommend using Protocol Buffers (Protobuf).

For more information see our Cache Encoding and Marshalling guide.

Annotation based Serialization

This can be done automatically by adding protostream annotations to your user classes. In addition, a single Initializer annotated interface is required which controls how the supporting classes are generated.

Here is an example of how the preceding classes should be changed:

Author.java
@Proto (1)
public record Author(String name, String surname) { (2)
}
1 Since Protostream 5.0, a single annotation is needed to generate a default mapping
2 Since Protostream 5.0, records are supported
Type.java
@Proto
public enum Type { (1)
    FANTASY,
    PROGRAMMING
}
1 Enums are supported
Book.java
@Proto
@Indexed (1)
public record Book(@Text String title, (2)
                   @Keyword(projectable = true, sortable = true, normalizer = "lowercase", indexNullAs = "unnamed", norms = false) (3)
                   String description,
                   int publicationYear,
                   Set<Author> authors, (4)
                   Type bookType,
                   BigDecimal price) { (5)
}
1 Indicates that the entity will be indexed. Necessary to perform distributed full-text query operations.
2 Indicates the title should be indexed as text
3 Indicates the description field field should be indexed as a Keyword.
4 Collections are supported
5 Protostream provides default Protobuf mappers for commonly used types as BigDecimal, included in the org.infinispan.protostream.types package.

Then all that is required is a very simple GeneratedSchema interface with an annotation on it to specify configuration settings

BooksSchema.java
import org.infinispan.protostream.GeneratedSchema;
import org.infinispan.protostream.annotations.ProtoSchema;
import org.infinispan.protostream.types.java.math.BigDecimalAdapter;

@ProtoSchema(includeClasses = { Book.class, Author.class, BigDecimalAdapter.class }, schemaPackageName = "book_sample")
interface BookStoreSchema extends GeneratedSchema {
}

You can use the basePackages property to scan a full package containing your classes. You can override the default marshalling by using the @Protofield annotation.

So in this case we will automatically generate the marshaller and schemas for the included classes and place them in the schema package automatically. The package does not have to be provided, but if you use Infinispan search capabilities, you must know the generated package.

In Quarkus the schemaFileName and schemaFilePath attributes should NOT be set on the ProtoSchema annotation. Setting either attributes causes native runtime errors.

Custom serialization

The previous method is suggested for any case when the user can annotate their classes. Unfortunately the user may not be able to annotate all classes they will put in the cache. In this case you must define your schema and create your own Marshaller(s) yourself.

Protobuf schema

You can supply a protobuf schema through either one of two ways.

  1. Proto File
    You can put the .proto file in the META-INF directory of the project. These files will automatically be picked up at initialization time.

    library.proto
    package book_sample;
    
    message Book {
      required string title = 1;
      required string description = 2;
      required int32 publicationYear = 3; // no native Date type available in Protobuf
      repeated Author authors = 4;
      requited double price = 5; // no native BigDecimal type available in Protobuf but you can use the adapter
    }
    
    message Author {
      required string name = 1;
      required string surname = 2;
    }
  2. In Code
    Or you can define the proto schema directly in user code by defining a produced bean of type org.infinispan.protostream.schema.Schema.

       @Produces
       Schema bookSchema() {
            return new Schema.Builder("book.proto")
                    .packageName("book_sample")
                    .addMessage("Author")
                         .addField(Type.Scalar.STRING, "name", 1)
                         .addField(Type.Scalar.STRING, "surname", 2)
                    .addMessage("Book")
                         .addField(Type.Scalar.STRING, "title", 1)
                         .addField(Type.Scalar.STRING, "description", 2)
                         .addField(Type.Scalar.INT32, "publicationYear", 3)
                         .addRepeatedField(Type.create("Author"), "author", 4)
                         .addField(Type.Scalar.DOUBLE, "price", 5)
                    .build();
        }
User Marshaller

The last thing to do is to provide a org.infinispan.protostream.MessageMarshaller implementation for each user class defined in the proto schema. This class is then provided via @Produces in a similar fashion to the code based proto schema definition above.

Here is the Marshaller class for our Author & Book classes.

The type name must match the <protobuf package>.<protobuf message> exactly!
AuthorMarshaller.java
public class AuthorMarshaller implements MessageMarshaller<Author> {

   @Override
   public String getTypeName() {
      return "book_sample.Author";
   }

   @Override
   public Class<? extends Author> getJavaClass() {
      return Author.class;
   }

   @Override
   public void writeTo(ProtoStreamWriter writer, Author author) throws IOException {
      writer.writeString("name", author.getName());
      writer.writeString("surname", author.getSurname());
   }

   @Override
   public Author readFrom(ProtoStreamReader reader) throws IOException {
      String name = reader.readString("name");
      String surname = reader.readString("surname");
      return new Author(name, surname);
   }
}
BookMarshaller.java
public class BookMarshaller implements MessageMarshaller<Book> {

   @Override
   public String getTypeName() {
      return "book_sample.Book";
   }

   @Override
   public Class<? extends Book> getJavaClass() {
      return Book.class;
   }

   @Override
   public void writeTo(ProtoStreamWriter writer, Book book) throws IOException {
      writer.writeString("title", book.getTitle());
      writer.writeString("description", book.getDescription());
      writer.writeInt("publicationYear", book.getPublicationYear());
      writer.writeCollection("authors", book.getAuthors(), Author.class);
      writer.writeDouble("price", book.getPrice().doubleValue());
   }

   @Override
   public Book readFrom(ProtoStreamReader reader) throws IOException {
      String title = reader.readString("title");
      String description = reader.readString("description");
      int publicationYear = reader.readInt("publicationYear");
      Set<Author> authors = reader.readCollection("authors", new HashSet<>(), Author.class);
      BigDecimal price = BigDecimal.valueOf(reader.readDouble("price"));
      return new Book(title, description, publicationYear, authors, price);
   }
}

And you pass the marshaller by defining the following:

   @Produces
   MessageMarshaller authorMarshaller() {
      return new AuthorMarshaller();
   }

   @Produces
   MessageMarshaller bookMarshaller() {
      return new BookMarshaller();
   }
The above produced Marshaller method MUST return MessageMarshaller without types or else it will not be found.

Dependency Injection

As you saw above we support the user injecting Marshaller configuration. You can do the inverse with the Infinispan client extension providing injection for RemoteCacheManager and RemoteCache objects. There is one global RemoteCacheManager that takes all the configuration parameters setup in the above sections.

It is very simple to inject these components. All you need to do is to add the @Inject annotation to the field, constructor or method. In the below code we utilize field and constructor injection.

SomeClass.java
    @Inject
    SomeClass(RemoteCacheManager remoteCacheManager) {
       this.remoteCacheManager = remoteCacheManager;
    }

    @Inject
    @Remote("myCache")
    RemoteCache<String, Book> cache;

    RemoteCacheManager remoteCacheManager;

If you notice the RemoteCache declaration has an additional annotation named Remote. This is a qualifier annotation allowing you to specify which named cache that will be injected. This annotation is not required and if it is not supplied, the default cache will be injected. The RemoteCacheManager and RemoteCache bean scope is @ApplicationScoped.

For non default connections, combine the qualifier @InfinispanClientName and @Remote.

SomeClass.java
    @Inject
    @InfinispanClientName("lon-site")
    @Remote("books")
    RemoteCache<String, Book> lonBooks;

    @Inject
    @InfinispanClientName("nyc-site")
    @Remote("books")
    RemoteCache<String, Book> nycBooks;
Other types may be supported for injection, please see other sections for more information

Mock Support

Quarkus supports the use of mock objects using two different approaches. You can either use CDI alternatives to mock out a bean for all test classes, or use QuarkusMock to mock out beans on a per test basis. Check the Getting started with testing guide for more information.

RemoteCacheManager and RemoteCache can be mocked.

BookService.java
@ApplicationScoped
public class BookService {

   @Inject
   @Remote("books")
   RemoteCache<String, Book> books; (1)

   public String getBookDescriptionById(String id) {
      Book book = books.get(id);
      if (book == null) {
         return "default";
      }

      return book.getDescription();
   }
}
1 Use dependency injection to connect to the books cache

In the test class, the RemoteCache can be mocked.

BookServiceTest.java
@QuarkusTest
public class BookServiceTest {

    @Inject
    BookService bookService;

    @InjectMock (1)
    @Remote("books")
    RemoteCache<String, Book> bookRemoteCache;

    @Test
    public void mockRemoteCache() {
        Mockito.when(bookRemoteCache.get("harry_potter")).thenReturn(new Book(... "Best saga ever");(2)

        Assertions.assertThat(bookService.getBookDescriptionById("harry_potter")).isEqualTo("Best saga ever");(3)
    }
}
1 Inject a mock instead of the RemoteCache bean
2 Use Mockito to mock the call of the RemoteCache
3 Assert the service call

Registering Protobuf Schemas with Infinispan Server

You need to register the generated Protobuf schemas with Infinispan Server to perform queries or convert from Protobuf to other media types such as JSON.

You can check the schemas that exist under the Schemas tab by logging into Infinispan Console at http://SERVER_HOST:SERVER_PORT (for example http://localhost:11222).

Check the Infinispan Dev Services Guide to connect to the Infinispan Dev Services server.

By default, Protobuf schemas generated this way will be registered by this extension when the client first connects. However, it might be required to handle the registration manually as a schema may evolve over time when used in production, so you can disable this from occurring by configuring the quarkus.infinispan-client.use-schema-registration to false.

To configure the schema manually please use Infinispan Operator for Kubernetes deployments, Infinispan Console, REST API or the Hot Rod Java Client.

Caching using annotations

Infinispan Caching annotations are deprecated in this extension and will be removed. Use or replace your annotations by using the Infinispan Cache extension. Update your import statements to use the annotations from io.quarkus.cache package instead of io.quarkus.infinispan.client.

The Infinispan Client extension offers a set of annotations that can be used in a CDI managed bean to enable caching abilities with Infinispan.

Caching annotations are not allowed on private methods. They will work fine with any other access modifier including package-private (no explicit modifier).

@CacheResult

Loads a method result from the cache without executing the method body whenever possible.

When a method annotated with @CacheResult is invoked, Quarkus will use the method argument as the cache key and check in the cache whether the method has been already invoked. Methods with multiple parameters are not allowed. For composite keys, define a Protobuf schema that will hold multiple values. If a value is found in the cache, it is returned and the annotated method is never actually executed. If no value is found, the annotated method is invoked and the returned value is stored in the cache using the computed key. This annotation cannot be used on a method returning void.

Infinispan Client extension is not able yet to cache null values unlike the Quarkus-Cache extension.

@CacheInvalidate

Removes an entry from the cache.

When a method annotated with @CacheInvalidate is invoked, Infinispan will use the method argument as a cache key to try to remove an existing entry from the cache. If the key does not identify any cache entry, nothing will happen.

@CacheInvalidateAll

When a method annotated with @CacheInvalidateAll is invoked, Infinispan will remove all entries from the cache.

Querying

The Infinispan client supports both indexed and non-indexed search as long as the ProtoStreamMarshaller is configured above. This allows the user to query on keys or values based on the properties of the proto schema. Indexed queries are preferred for performance reasons.

XML
<distributed-cache name="books" statistics="true">
    <!-- other configuration -->
	<indexing enabled="true" storage="filesystem" startup-mode="PURGE">
		<indexed-entities>
			<indexed-entity>book_sample.Book</indexed-entity>
		</indexed-entities>
	</indexing>
</distributed-cache>
JSON
{
  "books": {
    "distributed-cache": {
      ...
      "indexing": {
        "enabled": true,
        "storage": "filesystem",
        "startupMode": "PURGE",
        "indexed-entities": [
          "book_sample.Book"
        ]
      }
    }
  }
}
YAML
distributedCache:
  # other configuration
  indexing:
    enabled: "true"
    storage: "filesystem"
    startupMode: "PURGE"
    indexedEntities:
      - "book_sample.Book"

Query builds upon the proto definitions you can configure when setting up the ProtoStreamMarshaller. Either method of Serialization above will automatically register the schema with the server at startup, meaning that you will automatically gain the ability to query objects stored in the remote Infinispan Server.

Book.java
@Indexed (1)
public class Book {

    @ProtoFactory
    public Book(String title, String description, int publicationYear, Set<Author> authors) {
      ...
    }

    @ProtoField(number = 1)
    @Text (2)
    public String getTitle() {
        return title;
    }

    @ProtoField(number = 2)
    @Keyword(projectable = true, sortable = true, normalizer = "lowercase", indexNullAs = "unnamed", norms = false) (3)
    public String getDescription() {
        return description;
    }
    ...
1 @Indexed annotation makes the POJO indexable
2 @Basic annotation is used for indexed fields without any special transformation
3 @Keyword annotation is used to apply a normalizer to a text field

You can use either the Query DSL or the Ickle Query language with the Quarkus Infinispan client extension.

Query.java
@Inject
@Remote("books")
RemoteCache<String, Book> booksCache; (1)

Query<Book> query = booksCache.query("from book_sample.Book b where b.authors.name like '%" + name + "%'"); (2)
List<Book> list = query.execute().list();
1 Inject the books cache
2 Perform a full text query on books author name
You can read more about querying in the Infinispan documentation.

Prior to Quarkus 3.9 and the Infinispan 15 integration, queries were executed by calling the following code: .Query.java

QueryFactory queryFactory = Search.getQueryFactory(booksCache); (1)
Query query = queryFactory.create("from book_sample.Book");
List<Book> list = query.execute().list();
1 Breaking change in 3.9

This code won’t work anymore since RemoteCache is now an @ApplicationScoped proxy bean. Search.getQueryFactory will raise a ClassCastException. Remove the unecessary indirection by using the query method in the RemoteCache API as follows.

Query<Book> query = booksCache.<Book>query("from book_sample.Book");
List<Book> list = query.execute().list();

Counters

Infinispan also has a notion of counters and the Quarkus Infinispan client supports them out of the box.

The Quarkus Infinispan client extension allows for Dependency Injection of the CounterManager directly. All you need to do is annotate your field, constructor or method, and you get it with no fuss. You can then use counters as you would normally.

@Inject
CounterManager counterManager;

You can read more about clustered counters in the Infinispan documentation.

Near Caching

Near caching is disabled by default, but you can enable it on a per cache basic by configuring the following properties:

quarkus.infinispan-client.cache.books.near-cache-mode=INVALIDATED (1)
quarkus.infinispan-client.cache.books.near-cache-max-entries=200 (2)
quarkus.infinispan-client.cache.books.near-cache-use-bloom-filter=true (3)
1 Enables near caching for the 'books' cache by setting the mode to INVALIDATED
2 Sets the maximum number of entries that the near cache of the 'books' cache can hold before eviction occurs
3 Enables bloom filter for the 'books' cache

Bounded near caching

You should always use bounded near caches by specifying the maximum number of entries they can contain.

Bloom filters

If you need to optimize the performance for write operations by reducing the total number of invalidation messages, enable bloom filter. Bloom filters reside on Infinispan Server and keep track of the entries that the client has requested. They cannot be used with unbounded near cache: maximum number of entries must be defined when enabling bloom filters.

Encryption

Encryption at this point requires additional steps to get working.

The first step is to configure the application.properties file to point to your truststore and/or keystore. This is further detailed here.

The Infinispan Client extension enables SSL/TLS by default. You can read more about this at Using SSL With Native Executables.

SSL Host Name Validation

To prevent MITM attacks, when SSL is enabled, SSL host name validation is enabled by default in Infinispan. In this case, configuring the SNI host name is mandatory to start the client.

quarkus.infinispan-client.sni-host-name=localhost (1)
1 Sets the SNI host name

This behaviour can be changed by disabling the validation.

quarkus.infinispan-client.ssl-host-name-validation=false (1)
1 Disables ssl host name validation

Additional Features

The Infinispan Client has additional features that were not mentioned here. This means this feature was not tested in a Quarkus environment, and they may or may not work. Please let us know if you need these added!

Dev Services for Infinispan

When you use the infinispan-client extension in dev mode or in test, Quarkus automatically starts an Infinispan server and configure your application.

Enabling / Disabling Dev Services for Infinispan

Learn more in the Infinispan Dev Services guide.

Shared server

Quarkus will share the Infinispan broker if you have multiple applications running in dev mode. Dev Services for Infinispan implements a service discovery mechanism for your multiple Quarkus applications running in dev mode to share a single broker.

Dev Services for Infinispan starts the container with the quarkus-dev-service-infinispan label which is used to identify the container.

If you need multiple (shared) Infinispan server, you can configure the quarkus.infinispan-client.devservices.service-name attribute and indicate the server name. It looks for a container with the same value, or starts a new one if none can be found. The default service name is infinispan.

Sharing is enabled by default in dev mode, but disabled in test mode. You can disable the sharing with quarkus.infinispan-client.devservices.shared=false.

Setting the port

By default, Dev Services for Infinispan picks a random port and configures the application. You can set the port by configuring the quarkus.infinispan-client.devservices.port property.

Configuration Reference

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

Sets the marshallerClass. Default is ProtoStreamMarshaller

Environment variable: QUARKUS_INFINISPAN_CLIENT_MARSHALLER_CLASS

Show more

string

Whether or not a health check is published in case the smallrye-health extension is present.

This is a global setting and is not specific to an Infinispan Client.

Environment variable: QUARKUS_INFINISPAN_CLIENT_HEALTH_ENABLED

Show more

boolean

true

Sets the URI of the running Infinispan server to connect to. hotrod://localhost:11222@admin:password If provided hosts, username and password will be ignored.

Environment variable: QUARKUS_INFINISPAN_CLIENT_URI

Show more

string

Sets the host name/port to connect to. Each one is separated by a semicolon (eg. host1:11222;host2:11222).

Environment variable: QUARKUS_INFINISPAN_CLIENT_HOSTS

Show more

string

Sets client intelligence used by authentication Available values: * BASIC - Means that the client doesn’t handle server topology changes and therefore will only use the list of servers supplied at configuration time. * TOPOLOGY_AWARE - Use this provider if you don’t want the client to present any certificates to the remote TLS host. * HASH_DISTRIBUTION_AWARE - Like TOPOLOGY_AWARE but with the additional advantage that each request involving keys will be routed to the server who is the primary owner which improves performance greatly. This is the default.

Environment variable: QUARKUS_INFINISPAN_CLIENT_CLIENT_INTELLIGENCE

Show more

string

HASH_DISTRIBUTION_AWARE

Enables or disables authentication. Set it to false when connecting to an Infinispan Server without authentication. deployments. Default is 'true'.

Environment variable: QUARKUS_INFINISPAN_CLIENT_USE_AUTH

Show more

boolean

true

Sets username used by authentication.

Environment variable: QUARKUS_INFINISPAN_CLIENT_USERNAME

Show more

string

Sets password used by authentication.

Environment variable: QUARKUS_INFINISPAN_CLIENT_PASSWORD

Show more

string

Sets realm used by authentication

Environment variable: QUARKUS_INFINISPAN_CLIENT_AUTH_REALM

Show more

string

default

Sets server name used by authentication

Environment variable: QUARKUS_INFINISPAN_CLIENT_AUTH_SERVER_NAME

Show more

string

infinispan

Sets SASL mechanism used by authentication. Available values: * DIGEST-MD5 - Uses the MD5 hashing algorithm in addition to nonces to encrypt credentials. This is the default. * EXTERNAL - Uses client certificates to provide valid identities to Infinispan Server and enable encryption. * PLAIN - Sends credentials in plain text (unencrypted) over the wire in a way that is similar to HTTP BASIC authentication. You should use PLAIN authentication only in combination with TLS encryption.

Environment variable: QUARKUS_INFINISPAN_CLIENT_SASL_MECHANISM

Show more

string

DIGEST-MD5

Specifies the filename of a keystore to use to create the SSLContext. You also need to specify a keyStorePassword. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT_KEY_STORE

Show more

string

Specifies the password needed to open the keystore. You also need to specify a keyStore. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT_KEY_STORE_PASSWORD

Show more

string

Specifies the type of the keyStore, such as PKCS12.

Environment variable: QUARKUS_INFINISPAN_CLIENT_KEY_STORE_TYPE

Show more

string

Sets the unique name used to identify a specific key pair in a keystore for secure connections.

Environment variable: QUARKUS_INFINISPAN_CLIENT_KEY_ALIAS

Show more

string

Specifies the filename of a truststore to use to create the SSLContext. You also need to specify a trustStorePassword. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT_TRUST_STORE

Show more

string

Specifies the password needed to open the truststore You also need to specify a trustStore. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT_TRUST_STORE_PASSWORD

Show more

string

Specifies the type of the truststore, such as JKS or JCEKS. Defaults to JKS if trustStore is enabled.

Environment variable: QUARKUS_INFINISPAN_CLIENT_TRUST_STORE_TYPE

Show more

string

Configures the secure socket protocol. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT_SSL_PROTOCOL

Show more

string

Sets the ssl provider. For example BCFIPS Setting this implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT_SSL_PROVIDER

Show more

string

Configures the ciphers. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT_SSL_CIPHERS

Show more

list of string

Do SSL hostname validation. Defaults to true.

Environment variable: QUARKUS_INFINISPAN_CLIENT_SSL_HOST_NAME_VALIDATION

Show more

boolean

SNI host name. Mandatory when SSL is enabled and host name validation is true.

Environment variable: QUARKUS_INFINISPAN_CLIENT_SNI_HOST_NAME

Show more

string

Configures the socket timeout.

Environment variable: QUARKUS_INFINISPAN_CLIENT_SOCKET_TIMEOUT

Show more

int

Whether a tracing propagation is enabled in case the Opentelemetry extension is present. By default the propagation of the context is propagated from the client to the Infinispan Server.

Environment variable: QUARKUS_INFINISPAN_CLIENT_TRACING_PROPAGATION_ENABLED

Show more

boolean

Enables or disables Protobuf generated schemas upload to the server. Set it to 'false' when you need to handle the lifecycle of the Protobuf Schemas on Server side yourself. Default is 'true'. This is a global setting and is not specific to a Infinispan Client.

Environment variable: QUARKUS_INFINISPAN_CLIENT_USE_SCHEMA_REGISTRATION

Show more

boolean

true

Starts the client and connects to the server. If set to false, you’ll need to start it yourself.

Environment variable: QUARKUS_INFINISPAN_CLIENT_START_CLIENT

Show more

boolean

true

Cache configuration file in XML, JSON or YAML is defined in build time to create the cache on first access. An example of the user defined property. cacheConfig.xml file is located in the 'resources' folder: quarkus.infinispan-client.cache.bookscache.configuration-resource=cacheConfig.xml

Environment variable: QUARKUS_INFINISPAN_CLIENT_CACHE__CACHE__CONFIGURATION_RESOURCE

Show more

string

Cache configuration in inlined XML to create the cache on first access. Will be ignored if the configuration-uri is provided for the same cache name. An example of the user defined property: quarkus.infinispan-client.cache.bookscache.configuration=

Environment variable: QUARKUS_INFINISPAN_CLIENT_CACHE__CACHE__CONFIGURATION

Show more

string

Cache configuration file in XML, Json or YAML whose path will be converted to URI to create the cache on first access. An example of the user defined property. cacheConfig.xml file is located in the 'resources' folder: quarkus.infinispan-client.cache.bookscache.configuration-uri=cacheConfig.xml

Environment variable: QUARKUS_INFINISPAN_CLIENT_CACHE__CACHE__CONFIGURATION_URI

Show more

string

The maximum number of entries to keep locally for the specified cache.

Environment variable: QUARKUS_INFINISPAN_CLIENT_CACHE__CACHE__NEAR_CACHE_MAX_ENTRIES

Show more

int

Sets near cache mode used by the Infinispan Client Available values: * DISABLED - Means that near caching is disabled. This is the default value. * INVALIDATED - Means is near caching is invalidated, so when entries are updated or removed server-side, invalidation messages will be sent to clients to remove them from the near cache.

Environment variable: QUARKUS_INFINISPAN_CLIENT_CACHE__CACHE__NEAR_CACHE_MODE

Show more

disabled, invalidated

Enables bloom filter for near caching. Bloom filters optimize performance for write operations by reducing the total number of invalidation messages.

Environment variable: QUARKUS_INFINISPAN_CLIENT_CACHE__CACHE__NEAR_CACHE_USE_BLOOM_FILTER

Show more

boolean

Sets the host name/port to connect to. Each one is separated by a semicolon (eg. hostA:11222;hostB:11222).

Environment variable: QUARKUS_INFINISPAN_CLIENT_BACKUP_CLUSTER__BACKUP_CLUSTER__HOSTS

Show more

string

required

Sets client intelligence used by authentication Available values: * BASIC - Means that the client doesn’t handle server topology changes and therefore will only use the list of servers supplied at configuration time. * TOPOLOGY_AWARE - Use this provider if you don’t want the client to present any certificates to the remote TLS host. * HASH_DISTRIBUTION_AWARE - Like TOPOLOGY_AWARE but with the additional advantage that each request involving keys will be routed to the server who is the primary owner which improves performance greatly. This is the default.

Environment variable: QUARKUS_INFINISPAN_CLIENT_BACKUP_CLUSTER__BACKUP_CLUSTER__CLIENT_INTELLIGENCE

Show more

string

HASH_DISTRIBUTION_AWARE

Enables or disables Protobuf generated schemas upload to the backup. Set it to 'false' when you need to handle the lifecycle of the Protobuf Schemas on Server side yourself. Default is 'true'. This setting will be ignored if the Global Setting is set up to false.

Environment variable: QUARKUS_INFINISPAN_CLIENT_BACKUP_CLUSTER__BACKUP_CLUSTER__USE_SCHEMA_REGISTRATION

Show more

boolean

true

Named clients

Type

Default

Sets the marshallerClass. Default is ProtoStreamMarshaller

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__MARSHALLER_CLASS

Show more

string

Cache configuration file in XML, JSON or YAML is defined in build time to create the cache on first access. An example of the user defined property. cacheConfig.xml file is located in the 'resources' folder: quarkus.infinispan-client.cache.bookscache.configuration-resource=cacheConfig.xml

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__CACHE__CACHE__CONFIGURATION_RESOURCE

Show more

string

Sets the URI of the running Infinispan server to connect to. hotrod://localhost:11222@admin:password If provided hosts, username and password will be ignored.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__URI

Show more

string

Sets the host name/port to connect to. Each one is separated by a semicolon (eg. host1:11222;host2:11222).

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__HOSTS

Show more

string

Sets client intelligence used by authentication Available values: * BASIC - Means that the client doesn’t handle server topology changes and therefore will only use the list of servers supplied at configuration time. * TOPOLOGY_AWARE - Use this provider if you don’t want the client to present any certificates to the remote TLS host. * HASH_DISTRIBUTION_AWARE - Like TOPOLOGY_AWARE but with the additional advantage that each request involving keys will be routed to the server who is the primary owner which improves performance greatly. This is the default.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__CLIENT_INTELLIGENCE

Show more

string

HASH_DISTRIBUTION_AWARE

Enables or disables authentication. Set it to false when connecting to an Infinispan Server without authentication. deployments. Default is 'true'.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__USE_AUTH

Show more

boolean

true

Sets username used by authentication.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__USERNAME

Show more

string

Sets password used by authentication.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__PASSWORD

Show more

string

Sets realm used by authentication

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__AUTH_REALM

Show more

string

default

Sets server name used by authentication

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__AUTH_SERVER_NAME

Show more

string

infinispan

Sets SASL mechanism used by authentication. Available values: * DIGEST-MD5 - Uses the MD5 hashing algorithm in addition to nonces to encrypt credentials. This is the default. * EXTERNAL - Uses client certificates to provide valid identities to Infinispan Server and enable encryption. * PLAIN - Sends credentials in plain text (unencrypted) over the wire in a way that is similar to HTTP BASIC authentication. You should use PLAIN authentication only in combination with TLS encryption.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__SASL_MECHANISM

Show more

string

DIGEST-MD5

Specifies the filename of a keystore to use to create the SSLContext. You also need to specify a keyStorePassword. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__KEY_STORE

Show more

string

Specifies the password needed to open the keystore. You also need to specify a keyStore. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__KEY_STORE_PASSWORD

Show more

string

Specifies the type of the keyStore, such as PKCS12.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__KEY_STORE_TYPE

Show more

string

Sets the unique name used to identify a specific key pair in a keystore for secure connections.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__KEY_ALIAS

Show more

string

Specifies the filename of a truststore to use to create the SSLContext. You also need to specify a trustStorePassword. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__TRUST_STORE

Show more

string

Specifies the password needed to open the truststore You also need to specify a trustStore. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__TRUST_STORE_PASSWORD

Show more

string

Specifies the type of the truststore, such as JKS or JCEKS. Defaults to JKS if trustStore is enabled.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__TRUST_STORE_TYPE

Show more

string

Configures the secure socket protocol. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__SSL_PROTOCOL

Show more

string

Sets the ssl provider. For example BCFIPS Setting this implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__SSL_PROVIDER

Show more

string

Configures the ciphers. Setting this property implicitly enables SSL/TLS.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__SSL_CIPHERS

Show more

list of string

Do SSL hostname validation. Defaults to true.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__SSL_HOST_NAME_VALIDATION

Show more

boolean

SNI host name. Mandatory when SSL is enabled and host name validation is true.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__SNI_HOST_NAME

Show more

string

Configures the socket timeout.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__SOCKET_TIMEOUT

Show more

int

Whether a tracing propagation is enabled in case the Opentelemetry extension is present. By default the propagation of the context is propagated from the client to the Infinispan Server.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__TRACING_PROPAGATION_ENABLED

Show more

boolean

Cache configuration in inlined XML to create the cache on first access. Will be ignored if the configuration-uri is provided for the same cache name. An example of the user defined property: quarkus.infinispan-client.cache.bookscache.configuration=

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__CACHE__CACHE__CONFIGURATION

Show more

string

Cache configuration file in XML, Json or YAML whose path will be converted to URI to create the cache on first access. An example of the user defined property. cacheConfig.xml file is located in the 'resources' folder: quarkus.infinispan-client.cache.bookscache.configuration-uri=cacheConfig.xml

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__CACHE__CACHE__CONFIGURATION_URI

Show more

string

The maximum number of entries to keep locally for the specified cache.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__CACHE__CACHE__NEAR_CACHE_MAX_ENTRIES

Show more

int

Sets near cache mode used by the Infinispan Client Available values: * DISABLED - Means that near caching is disabled. This is the default value. * INVALIDATED - Means is near caching is invalidated, so when entries are updated or removed server-side, invalidation messages will be sent to clients to remove them from the near cache.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__CACHE__CACHE__NEAR_CACHE_MODE

Show more

disabled, invalidated

Enables bloom filter for near caching. Bloom filters optimize performance for write operations by reducing the total number of invalidation messages.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__CACHE__CACHE__NEAR_CACHE_USE_BLOOM_FILTER

Show more

boolean

Sets the host name/port to connect to. Each one is separated by a semicolon (eg. hostA:11222;hostB:11222).

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__BACKUP_CLUSTER__BACKUP_CLUSTER__HOSTS

Show more

string

required

Sets client intelligence used by authentication Available values: * BASIC - Means that the client doesn’t handle server topology changes and therefore will only use the list of servers supplied at configuration time. * TOPOLOGY_AWARE - Use this provider if you don’t want the client to present any certificates to the remote TLS host. * HASH_DISTRIBUTION_AWARE - Like TOPOLOGY_AWARE but with the additional advantage that each request involving keys will be routed to the server who is the primary owner which improves performance greatly. This is the default.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__BACKUP_CLUSTER__BACKUP_CLUSTER__CLIENT_INTELLIGENCE

Show more

string

HASH_DISTRIBUTION_AWARE

Enables or disables Protobuf generated schemas upload to the backup. Set it to 'false' when you need to handle the lifecycle of the Protobuf Schemas on Server side yourself. Default is 'true'. This setting will be ignored if the Global Setting is set up to false.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__BACKUP_CLUSTER__BACKUP_CLUSTER__USE_SCHEMA_REGISTRATION

Show more

boolean

true

Dev Services

Type

Default

If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present.

When DevServices is enabled Quarkus will attempt to automatically configure and start a database when running in Dev or Test mode and when Docker is running.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_ENABLED

Show more

boolean

true

When the configuration is empty, an Infinispan default client is automatically created to connect to the running dev service. However, there are scenarios where creating this client is unnecessary, yet we still need to spin up an Infinispan Server. In such cases, this property serves to determine whether the client should be created by default or not by the extension.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_CREATE_DEFAULT_CLIENT

Show more

boolean

true

Optional fixed port the dev service will listen to.

If not defined, the port will be chosen randomly.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_PORT

Show more

int

Indicates if the Infinispan server managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Infinispan starts a new container.

The discovery uses the quarkus-dev-service-infinispan label. The value is configured using the service-name property.

Container sharing is only used in dev mode.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_SHARED

Show more

boolean

true

The value of the quarkus-dev-service-infinispan label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for Infinispan looks for a container with the quarkus-dev-service-infinispan label set to the configured value. If found, it will use this container instead of starting a new one. Otherwise, it starts a new container with the quarkus-dev-service-infinispan label set to the specified value.

This property is used when you need multiple shared Infinispan servers.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_SERVICE_NAME

Show more

string

infinispan

The image to use. Note that only official Infinispan images are supported.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_IMAGE_NAME

Show more

string

List of the artifacts to automatically download and add to the Infinispan server libraries.

For example a Maven coordinate (org.postgresql:postgresql:42.3.1) or a dependency location url.

If an invalid value is passed, the Infinispan server will throw an error when trying to start.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_ARTIFACTS

Show more

list of string

Add a site name to start the Infinispan Server Container with Cross Site Replication enabled (ex. lon). Cross Site Replication is the capability to connect two separate Infinispan Server Clusters that might run in different Data Centers, and configure backup caches to copy the data across the clusters with active-active or active-passive replication. See more about Cross Site Replication in the Infinispan Documentation https://infinispan.org/docs/stable/titles/xsite/xsite.html Configure mcast-port to avoid forming a cluster with any other running Infinispan Server container.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_SITE

Show more

string

If you are running an Infinispan Server already in docker, if the containers use the same mcastPort they will form a cluster. Set a different mcastPort to create a separate cluster in Docker (e. 46656). A common use case in a local Docker development mode, is the need of having two different Infinispan Clusters with Cross Site Replication enabled. see https://github.com/infinispan/infinispan-simple-tutorials/blob/main/infinispan-remote/cross-site-replication/docker-compose/

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_MCAST_PORT

Show more

int

Environment variables that are passed to the container.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_CONTAINER_ENV__ENVIRONMENT_VARIABLE_NAME_

Show more

Map<String,String>

Infinispan Server configuration chunks to be passed to the container.

Environment variable: QUARKUS_INFINISPAN_CLIENT__CLIENT_NAME__DEVSERVICES_CONFIG_FILES

Show more

list of string

Dev Services

Type

Default

If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present.

When DevServices is enabled Quarkus will attempt to automatically configure and start a database when running in Dev or Test mode and when Docker is running.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_ENABLED

Show more

boolean

true

When the configuration is empty, an Infinispan default client is automatically created to connect to the running dev service. However, there are scenarios where creating this client is unnecessary, yet we still need to spin up an Infinispan Server. In such cases, this property serves to determine whether the client should be created by default or not by the extension.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_CREATE_DEFAULT_CLIENT

Show more

boolean

true

Optional fixed port the dev service will listen to.

If not defined, the port will be chosen randomly.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_PORT

Show more

int

Indicates if the Infinispan server managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Infinispan starts a new container.

The discovery uses the quarkus-dev-service-infinispan label. The value is configured using the service-name property.

Container sharing is only used in dev mode.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_SHARED

Show more

boolean

true

The value of the quarkus-dev-service-infinispan label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for Infinispan looks for a container with the quarkus-dev-service-infinispan label set to the configured value. If found, it will use this container instead of starting a new one. Otherwise, it starts a new container with the quarkus-dev-service-infinispan label set to the specified value.

This property is used when you need multiple shared Infinispan servers.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_SERVICE_NAME

Show more

string

infinispan

The image to use. Note that only official Infinispan images are supported.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_IMAGE_NAME

Show more

string

List of the artifacts to automatically download and add to the Infinispan server libraries.

For example a Maven coordinate (org.postgresql:postgresql:42.3.1) or a dependency location url.

If an invalid value is passed, the Infinispan server will throw an error when trying to start.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_ARTIFACTS

Show more

list of string

Add a site name to start the Infinispan Server Container with Cross Site Replication enabled (ex. lon). Cross Site Replication is the capability to connect two separate Infinispan Server Clusters that might run in different Data Centers, and configure backup caches to copy the data across the clusters with active-active or active-passive replication. See more about Cross Site Replication in the Infinispan Documentation https://infinispan.org/docs/stable/titles/xsite/xsite.html Configure mcast-port to avoid forming a cluster with any other running Infinispan Server container.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_SITE

Show more

string

If you are running an Infinispan Server already in docker, if the containers use the same mcastPort they will form a cluster. Set a different mcastPort to create a separate cluster in Docker (e. 46656). A common use case in a local Docker development mode, is the need of having two different Infinispan Clusters with Cross Site Replication enabled. see https://github.com/infinispan/infinispan-simple-tutorials/blob/main/infinispan-remote/cross-site-replication/docker-compose/

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_MCAST_PORT

Show more

int

Environment variables that are passed to the container.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_CONTAINER_ENV__ENVIRONMENT_VARIABLE_NAME_

Show more

Map<String,String>

Infinispan Server configuration chunks to be passed to the container.

Environment variable: QUARKUS_INFINISPAN_CLIENT_DEVSERVICES_CONFIG_FILES

Show more

list of string

Related content