]> git.evergreen-ils.org Git - OpenSRF.git/blob - examples/opensrf_core.xml.example
in the rare case the select() is interrupted while waiting on child statuses, exit...
[OpenSRF.git] / examples / opensrf_core.xml.example
1 <?xml version="1.0"?>
2 <!-- 
3 vim:et:ts=2:sw=2:
4 -->
5 <config>
6
7   <!-- bootstrap config for OpenSRF apps -->
8   <opensrf>
9
10     <routers>
11
12       <!-- define the list of routers our services will register with -->
13
14       <router>
15
16         <!-- This is the public router.  On this router, we only register applications
17              which should be accessible to everyone on the opensrf network -->
18         <name>router</name>
19         <domain>public.localhost</domain>
20         <services>
21             <service>opensrf.math</service> 
22         </services>
23       </router>
24
25       <router>
26         <!-- This is the private router.  All applications must register with 
27             this router, so no explicit <services> section is required -->
28         <name>router</name>
29         <domain>private.localhost</domain>
30       </router>
31     </routers>
32
33
34     <!-- Jabber login settings
35         Our domain should match that of the private router -->
36     <domain>private.localhost</domain>
37     <username>opensrf</username>
38     <passwd>password</passwd>
39     <port>5222</port>
40     <!-- name of the router used on our private domain.  
41         this should match one of the <name> of the private router above -->
42     <router_name>router</router_name>
43
44     <!-- log file settings ======================================  -->
45     <!-- log to a local file -->
46     <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
47
48     <!-- Log to syslog. You can use this same layout for 
49         defining the logging of all services in this file -->
50     <!--
51     <logfile>syslog</logfile>
52     <syslog>local2</syslog>
53     <actlog>local1</actlog>
54     -->
55
56     <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
57     <loglevel>3</loglevel>
58
59     <!-- Maximum log message length; if using syslog, you might need to adjust
60          your syslog service's configuration to match longer message lengths -->
61     <loglength>1536</loglength>
62
63     <!-- config file for the services -->
64     <settings_config>SYSCONFDIR/opensrf.xml</settings_config>
65
66   </opensrf>
67
68   <!-- Update this if you use ChopChop -->
69   <chopchop>
70     <!-- Our jabber server -->
71     <domain>private.localhost</domain>
72     <port>5222</port>
73     <!-- used when multiple servers need to communicate -->
74     <s2sport>5269</s2sport>
75     <secret>secret</secret>
76     <listen_address>10.0.0.3</listen_address>
77     <loglevel>3</loglevel>
78     <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
79   </chopchop>
80
81   <!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
82   <gateway>
83
84     <!--
85     we consider ourselves to be the "originating" client for requests,
86     which means we define the log XID string for log traces
87     -->
88     <client>true</client>
89
90     <!--  the routers's name on the network -->
91     <router_name>router</router_name>
92
93     <!-- jabber login info -->
94     <!-- The gateway connects to the public domain -->
95     <domain>public.localhost</domain>
96     <username>opensrf</username>
97     <passwd>password</passwd>
98     <port>5222</port>
99     <logfile>LOCALSTATEDIR/log/gateway.log</logfile>
100     <loglevel>3</loglevel>
101
102   </gateway>
103
104   <!-- ======================================================================================== -->
105
106     <routers>
107         <router> <!-- public router -->
108             <trusted_domains>
109                 <!-- allow private services to register with this router 
110                      and public clients to send requests to this router. -->
111                 <server>private.localhost</server>
112                 <!-- also allow private clients to send to the router so it can receive error messages -->
113                 <client>private.localhost</client>
114                 <client>public.localhost</client>
115             </trusted_domains>
116             <transport>
117                 <server>public.localhost</server>
118                 <port>5222</port>
119                 <unixpath>LOCALSTATEDIR/sock/unix_sock</unixpath>
120                 <username>router</username>
121                 <password>password</password>
122                 <resource>router</resource>
123                 <connect_timeout>10</connect_timeout>
124                 <max_reconnect_attempts>5</max_reconnect_attempts>
125             </transport>
126             <logfile>LOCALSTATEDIR/log/router.log</logfile>
127             <!--
128             <logfile>syslog</logfile>
129             <syslog>local2</syslog>
130             -->
131             <loglevel>2</loglevel>
132         </router>
133         <router> <!-- private router -->
134             <trusted_domains>
135                 <server>private.localhost</server>
136                 <!-- only clients on the private domain can send requests to this router -->
137                 <client>private.localhost</client>
138             </trusted_domains>
139             <transport>
140                 <server>private.localhost</server>
141                 <port>5222</port>
142                 <username>router</username>
143                 <password>password</password>
144                 <resource>router</resource>
145                 <connect_timeout>10</connect_timeout>
146                 <max_reconnect_attempts>5</max_reconnect_attempts>
147             </transport>
148             <logfile>LOCALSTATEDIR/log/router.log</logfile>
149             <!--
150             <logfile>syslog</logfile>
151             <syslog>local2</syslog>
152             -->
153             <loglevel>4</loglevel>
154         </router>
155     </routers>
156
157   <!-- ======================================================================================== -->
158
159 </config>