Innehållsförteckning |
---|
Konfiguration (3.x, 4.x)
Kodblock |
---|
# #Standard Copyrightproperties (c)for 2013an Centerexternal forActiveMQ eHalsabroker, i samverkan (CeHis). # <http://cehis.se/> # # This file is part of SKLTP. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # TODO: Add security related properties here... # TODO: Add connector and service properties here... see soitoolkit-mule-jms-connector-activemq-external.xml. SOITOOLKIT_MULE_AMQ_BROKER_URL=failover:(tcp://localhost:61616) SOITOOLKIT_MULE_AMQ_MAX_REDELIVERIES=3 SOITOOLKIT_MULE_AMQ_REDELIVERY_DELAY=10000 SOITOOLKIT_MULE_AMQ_NO_OF_CONSUMERS=2 # Default queue names for info end error log-events SOITOOLKIT_LOG_INFO_QUEUE=SOITOOLKIT.LOG.INFO SOITOOLKIT_LOG_ERROR_QUEUE=SOITOOLKIT.LOG.ERROR # Set the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the # timeout for waiting for data. A timeout value of zero is interpreted as an infinite # timeout. SO_TIMEOUT_MS=2000 # Set the timeout in milliseconds until a connection is etablished. A value of zero # means the timeout is not used. CONNECTION_TIMEOUT_MS=1000 # Inbound endpoint for load balancers to use when probing PROBESERVICE_INBOUND_URL=http://localhost:8081/mule-probe # Path to file where mule probe has access to read file PROBESERVICE_FILE=src/main/resources/probeFile.txt # What value in PROBESERVICE_FILE that should respond http 500 service unavailable to load balancer PROBE_DOWN_CRITERIA=DOWN # What value should be returned to load balancer when no attributes set and everything is OK PROBE_RETURN_OK_STRING=OK ############################################################## # Configuration of PingForConfiguration producers to be probed # # probe.ping.<name>=<name>;<URL to roducer of PingForConfiguration> # probe.ping.<name>.connecttimeout=<value in milliseconds> # probe.ping.<name>.responsetimeout=<value in milliseconds> # # Status on selected resource will then be available through http://localhost:8081/mule-probe/probe/<name> # # Status on all resources will then be available through http://localhost:8081/mule-probe/probe ############################################################## # probe.ping.vp=vp;http://localhost:8080/vp/services/PingForConfiguration/1/rivtabp21 # probe.ping.vp.connecttimeout=500 # probe.ping.vp.responsetimeout=1000 |
Konfiguration (2.0.1 RC1)
Applikationens konfigurationsfil
Kodblock |
---|
# Standard properties for an external ActiveMQ broker, see soitoolkit-mule-jms-connector-activemq-external.xml. SOITOOLKIT_MULE_AMQ_BROKER_URL=failover:(tcp://localhost:61616) SOITOOLKIT_MULE_AMQ_MAX_REDELIVERIES=3 SOITOOLKIT_MULE_AMQ_REDELIVERY_DELAY=10000 SOITOOLKIT_MULE_AMQ_NO_OF_CONSUMERS=2 # Default queue names for info end error log-events SOITOOLKIT_LOG_INFO_QUEUE=SOITOOLKIT.LOG.INFO SOITOOLKIT_LOG_ERROR_QUEUE=SOITOOLKIT.LOG.ERROR # Set the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the # timeout for waiting for data. A timeout value of zero is interpreted as an infinite # Default timeout. SO_TIMEOUT_MS=2000 # Set the default timeout in milliseconds until a connection is etablished. A value of zero # means the timeout foris synchronousnot servicesused. SERVICECONNECTION_TIMEOUT_MS=1000 # Inbound endpoint for load balancers to use when probing PROBESERVICE_INBOUND_URL=http://localhost:8081/mule-probe/services/probeservice/inboundrest # Path to file where mule probe has access to read file PROBESERVICE_FILE=src/main/resources/probeFile.txt # Error configuration, error What value in PROBESERVICE_FILE that should respond http 500 service unavailable to load balancer PROBE_DOWN_CRITERIA=DOWN ############################################################## # Configuration of PingForConfiguration producers to be returned on case of any exception PROBESERVICE_ERROR_TEXT=ERROR OCCURED IN MULE LB PROBE SERVICE ON XYZprobed # # probe.ping.<name>=<name>;<URL to roducer of PingForConfiguration> # probe.ping.<name>.connecttimeout=<value in milliseconds> # probe.ping.<name>.responsetimeout=<value in milliseconds> # # Status on selected resource will then be available through http://localhost:8081/rest/probe/status/<name> # # Status on all resources will then be available through http://localhost:8081/rest/probe/status ############################################################## # probe.ping.vp=vp;http://localhost:8080/vp/services/PingForConfiguration/1/rivtabp21 # probe.ping.vp.connecttimeout=500 # probe.ping.vp.responsetimeout=1000 |
Applikationens probe file
Proben kan konfigureras att svara med HTTP 503 (Unavailable) på dessa sätt:
- genom att ange ett värde i PROBESERVICE_FILE som anger "ej tillgänglig", se detaljer nedan
- genom att ta bort PROBESERVICE_FILE (från filsystemet)
Applikationens probe file pekas ut via property PROBESERVICE_FILE, se konfigurationsexempel ovan.
PROBESERVICE_FILE=sökväg där probe file ligger
PROBE_DOWN_CRITERIA=värdet i probe file som kommer att göra att probe signalerar "ej tillgänglig"
Exempel på probeFile.txt som signalerar inte tillgänglig:
Kodblock | ||
---|---|---|
| ||
DOWN |