Class IgniteIndexerAutoConfiguration


  • @Configuration
    @AutoConfigureBefore(com.broadleafcommerce.search.index.autoconfigure.CoreIndexerAutoConfiguration.class)
    @EnableConfigurationProperties({com.broadleafcommerce.search.index.autoconfigure.IndexerProperties.class,IgniteIndexerProperties.class})
    public class IgniteIndexerAutoConfiguration
    extends Object
    Provides distributed configuration for this reindexer based on Apache Ignite: https://apacheignite.readme.io/docs https://apacheignite-mix.readme.io/docs
    Author:
    Kelly Tisdell (ktisdell)
    • Constructor Detail

      • IgniteIndexerAutoConfiguration

        public IgniteIndexerAutoConfiguration()
    • Method Detail

      • searchReindexerIgniteConfiguration

        @Bean
        @ConditionalOnMissingBean
        public org.apache.ignite.configuration.IgniteConfiguration searchReindexerIgniteConfiguration​(IgniteIndexerProperties igniteIndexerProperties)
        This specifies a default IgniteConfiguration. This is fine to evaluate this approach or to run locally. However, in most cases you will want to override this bean and provide a different discovery configuration.

        See the following docs:

        https://apacheignite.readme.io/docs/cluster-discovery

        https://apacheignite.readme.io/docs/tcpip-discovery

        By default this uses the TcpDiscoveryMulticastIpFinder and UDP. You can also use the TcpDiscoveryZookeeperIpFinder or the TcpDiscoveryKubernetesIpFinder described here:

        https://apacheignite.readme.io/docs/tcpip-discovery#section-zookeeper-ip-finder

        https://apacheignite.readme.io/docs/zookeeper-discovery

        https://apacheignite-mix.readme.io/docs/kubernetes-discovery

        Using Zookeeper or Kubernetes for discovery is recommended in production and other higher environments.

        This is not necessarily related to security. Instead it allows different nodes to be in a cluster and respond to different events or work.

        It may make sense, in a development mode where you'll likely use the defaults, to consider using a unique role name so that others running a similar application on the same network will not receive unwanted notifications.

        Client mode should be set to false. This node should participate in the cluster.

      • searchReindexerIgnite

        @Bean(destroyMethod="close")
        @ConditionalOnMissingBean
        public org.apache.ignite.Ignite searchReindexerIgnite​(org.apache.ignite.configuration.IgniteConfiguration configuration)
      • searchReindexerLockService

        @Bean
        @ConditionalOnMissingBean
        public com.broadleafcommerce.search.index.core.LockService searchReindexerLockService​(org.apache.ignite.Ignite ignite)
        See https://apacheignite.readme.io/docs/distributed-locks TODO Locks are not supported in atomic mode, and locks cannot be acquired inside a transaction. There's some more research to do here on the proper way we should acquire/release the locks.
      • searchReindexerProcessStateService

        @Bean
        @ConditionalOnMissingBean
        public com.broadleafcommerce.search.index.core.ProcessStateService searchReindexerProcessStateService​(org.apache.ignite.Ignite ignite,
                                                                                                              IgniteIndexerProperties igniteIndexerProperties)
        See https://apacheignite.readme.io/docs/messaging#section-ordered-messages
      • searchReindexerQueueProvider

        @Bean
        @ConditionalOnMissingBean
        public com.broadleafcommerce.search.index.core.queue.QueueProvider searchReindexerQueueProvider​(org.apache.ignite.Ignite ignite,
                                                                                                        com.broadleafcommerce.search.index.core.ProcessStateService pss,
                                                                                                        com.broadleafcommerce.search.index.autoconfigure.IndexerProperties indexerProperties)
        See https://apacheignite.readme.io/docs/queue-and-set