Skip to content

Commit

Permalink
Adding configuration for Alpaca timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
dannylamb committed Aug 4, 2021
1 parent af75197 commit b3e3f46
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 8 deletions.
4 changes: 4 additions & 0 deletions alpaca/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ ENV \
ALPACA_FITS_QUEUE=broker:queue:islandora-connector-fits \
ALPACA_FITS_REDELIVERIES=10 \
ALPACA_FITS_SERVICE=http://crayfits:8000 \
ALPACA_FITS_TIMEOUT=10000 \
ALPACA_HOMARUS_QUEUE=broker:queue:islandora-connector-homarus \
ALPACA_HOMARUS_REDELIVERIES=10 \
ALPACA_HOMARUS_SERVICE=http://homarus:8000/convert \
ALPACA_HOMARUS_TIMEOUT=10000 \
ALPACA_HOUDINI_QUEUE=broker:queue:islandora-connector-houdini \
ALPACA_HOUDINI_REDELIVERIES=10 \
ALPACA_HOUDINI_SERVICE=http://houdini:8000/convert \
ALPACA_HOUDINI_TIMEOUT=10000 \
ALPACA_HTTP_TOKEN=islandora \
ALPACA_INDEXING_MILLINER_URL=http://milliner:8000 \
ALPACA_INDEXING_REDELIVERIES=10 \
Expand All @@ -77,6 +80,7 @@ ENV \
ALPACA_OCR_QUEUE=broker:queue:islandora-connector-ocr \
ALPACA_OCR_REDELIVERIES=10 \
ALPACA_OCR_SERVICE=http://hypercube:8000 \
ALPACA_OCR_TIMEOUT=10000 \
JAVA_OPTS="-Dfile.encoding=UTF-8 -Dnet.sf.ehcache.skipUpdateCheck=true -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:MaxPermSize=128m -Xms512m -Xmx8g"

COPY --from=download --chown=karaf:karaf /opt/karaf /opt/karaf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@

<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=fcrepo/Broker)"/>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="https" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="requestConfigConfigurer" class="ca.islandora.alpaca.connector.derivative.RequestConfigConfigurer">
<property name="connectionRequestTimeoutMs" value="{{ getenv "ALPACA_FITS_TIMEOUT" }}"/>
<property name="connectTimeoutMs" value="{{ getenv "ALPACA_FITS_TIMEOUT" }}"/>
<property name="socketTimeoutMs" value="{{ getenv "ALPACA_FITS_TIMEOUT" }}"/>
</bean>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent">
<property name="httpClientConfigurer" ref="requestConfigConfigurer"/>
</bean>

<bean id="https" class="org.apache.camel.component.http4.HttpComponent">
<property name="httpClientConfigurer" ref="requestConfigConfigurer"/>
</bean>

<camelContext id="IslandoraConnectorFits" xmlns="http://camel.apache.org/schema/blueprint">
<package>ca.islandora.alpaca.connector.derivative</package>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@

<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=fcrepo/Broker)"/>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="https" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="requestConfigConfigurer" class="ca.islandora.alpaca.connector.derivative.RequestConfigConfigurer">
<property name="connectionRequestTimeoutMs" value="{{ getenv "ALPACA_HOMARUS_TIMEOUT" }}"/>
<property name="connectTimeoutMs" value="{{ getenv "ALPACA_HOMARUS_TIMEOUT" }}"/>
<property name="socketTimeoutMs" value="{{ getenv "ALPACA_HOMARUS_TIMEOUT" }}"/>
</bean>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent">
<property name="httpClientConfigurer" ref="requestConfigConfigurer"/>
</bean>

<bean id="https" class="org.apache.camel.component.http4.HttpComponent">
<property name="httpClientConfigurer" ref="requestConfigConfigurer"/>
</bean>

<camelContext id="IslandoraConnectorHomarus" xmlns="http://camel.apache.org/schema/blueprint">
<package>ca.islandora.alpaca.connector.derivative</package>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@

<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=fcrepo/Broker)"/>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="https" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="requestConfigConfigurer" class="ca.islandora.alpaca.connector.derivative.RequestConfigConfigurer">
<property name="connectionRequestTimeoutMs" value="{{ getenv "ALPACA_HOUDINI_TIMEOUT" }}"/>
<property name="connectTimeoutMs" value="{{ getenv "ALPACA_HOUDINI_TIMEOUT" }}"/>
<property name="socketTimeoutMs" value="{{ getenv "ALPACA_HOUDINI_TIMEOUT" }}"/>
</bean>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent">
<property name="httpClientConfigurer" ref="requestConfigConfigurer"/>
</bean>

<bean id="https" class="org.apache.camel.component.http4.HttpComponent">
<property name="httpClientConfigurer" ref="requestConfigConfigurer"/>
</bean>

<camelContext id="IslandoraConnectorHoudini" xmlns="http://camel.apache.org/schema/blueprint">
<package>ca.islandora.alpaca.connector.derivative</package>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@

<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=fcrepo/Broker)"/>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="https" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="requestConfigConfigurer" class="ca.islandora.alpaca.connector.derivative.RequestConfigConfigurer">
<property name="connectionRequestTimeoutMs" value="{{ getenv "ALPACA_OCR_TIMEOUT" }}"/>
<property name="connectTimeoutMs" value="{{ getenv "ALPACA_OCR_TIMEOUT" }}"/>
<property name="socketTimeoutMs" value="{{ getenv "ALPACA_OCR_TIMEOUT" }}"/>
</bean>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent">
<property name="httpClientConfigurer" ref="requestConfigConfigurer"/>
</bean>

<bean id="https" class="org.apache.camel.component.http4.HttpComponent">
<property name="httpClientConfigurer" ref="requestConfigConfigurer"/>
</bean>

<camelContext id="IslandoraConnectorOCR" xmlns="http://camel.apache.org/schema/blueprint">
<package>ca.islandora.alpaca.connector.derivative</package>
Expand Down

0 comments on commit b3e3f46

Please sign in to comment.