cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Configure hot folder to run only in single node in cluster enviornment

Former Member
0 Kudos
447

Hello Experts,

In prodction, we want to enable hot folder only in one node (let's say dataserver node). so do we need to configuration changes ?

Any pointers in this regard ?

Accepted Solutions (0)

Answers (2)

Answers (2)

ihar
Explorer
0 Kudos

It will be easier to implement hot folder beans loading for concrete profile. I mean something like

<beans profile='node_dataserver'>...</beans>

Profile could be setted up using properties or during application context startup (to make implementation more generinc and resolve node group in runtime). Take a look at spring.profiles.active property

Related docs: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-properties-and-configuration.ht...

Former Member
0 Kudos

Hi Gnanendra,

You need to configure the inbound-channel-adapter with auto-startup flag to disable it on other nodes. The sample configuration would be as follows:

 <file:inbound-channel-adapter id="{id}" directory="{directory}"
             filename-regex="{filename-regex}" auto-startup="false" >
 </file:inbound-channel-adapter>

Move the auto-startup value to property file and read it via configurationService here.

regards, Narender

Former Member
0 Kudos

Hi Narenda,

I have tried above approach (auto-startup="false"), but still files are getting imported in hot folder. Any other configuration requires to change ?

Former Member
0 Kudos

Try this on local first, it should stop the hotfolder process from consuy files. This is spring configuration and works without any issue.