This extension leverages https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for Quarkus]. The configuration of the HazelcastInstance is managed by the extension. To configure Hazelcast Instance, check the https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for Quarkus] guide.

IMPORTANT: `camel-quarkus-hazelcast` works only in client mode.

To use the `HazelcastInstance` bean in the Hazelcast component, you should configure the component as follows.

[source,java]
----
    <1>
    @Inject
    HazelcastInstance hazelcastInstance;

    @Produces
    @ApplicationScoped
    @Unremovable
    @Named("hazelcast-map")
    HazelcastDefaultComponent hazelcastMap() {
        final HazelcastMapComponent hazelcastComponent = new HazelcastMapComponent();
        hazelcastComponent.setHazelcastInstance(hazelcastInstance);
        <2>
        hazelcastComponent.setHazelcastMode(HazelcastConstants.HAZELCAST_CLIENT_MODE);
        return getHazelcastComponent(hazelcastComponent);
    }
----
<1> The `HazelcastInstance` bean instance created by the `quarkus-hazelcast` extension
<2> The Hazelcast mode must be set to client mode

Some more examples can be found in the Camel Quarkus Hazelcast https://github.com/apache/camel-quarkus/tree/main/integration-tests/hazelcast[integration tests].
