Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 2.32 KB

File metadata and controls

59 lines (42 loc) · 2.32 KB

Worker Mule Application

Workers will listen on a distributed Queue for new Quizzes to process:

  • Avoiding more than one Quiz per surveyed (distributed LOCK scope).
  • Updating Quizzes with additional data.
  • Storing Quizzes into Apache Ignite's distributed database (SQL Query Entity).
  • Updating global stats.

kube-mule-ignite-worker

Mule flow to listen on distributed Queue for new Quizzes to process, ensuring uniqueness:

mule-worker-app-ingest-flow

Mule flow to process Quizzes:

mule-worker-app-process-flow

Ignite Configuration for Kubernetes

Configure IP finder on ignite-config.xml as org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder with the kubernetes service name to find server nodes and the namespace.

 <bean id="ignite-config" class="org.apache.ignite.configuration.IgniteConfiguration">
    ...

    <!-- Explicitly configure TCP discovery SPI -->
    <property name="discoverySpi">
      <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="ipFinder">
          <!--
          Enables Kubernetes IP finder and set namespace and service name (cluster) to find SERVER nodes.
          -->
          <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
            <property name="shared" value="true" />
            <property name="namespace" value="my-mule4-stack" />
            <property name="serviceName" value="ignite-cluster-one-service" />
          </bean>
        </property>
      </bean>
    </property>

    ...
</bean>

Kubernetes artifacts

Build Mule application

Build application:

mvn clean package