LPXXX opensrf_core.xml example updated for redis user/berick/lpxxx-redisrf-streams-v2
authorBill Erickson <berickxx@gmail.com>
Wed, 22 Jun 2022 16:09:53 +0000 (12:09 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 22 Jun 2022 16:13:28 +0000 (12:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/examples/opensrf_core.xml.example

index aeba4ad..376f0a6 100644 (file)
 <?xml version="1.0"?>
-<!-- 
-Example OpenSRF bootstrap configuration file for Evergreen
--->
 <config>
-  <!-- Options for <loglevel>: 0 None, 1 Error, 2 Warning, 3 Info, 4 debug -->
-  <opensrf>
-    <routers>
 
-      <!-- define the list of routers our services will register with -->
-      <router>
-        <!-- 
-          This is the public router.  On this router, we only register
-          applications which should be accessible to everyone on the OpenSRF
-          network
-        -->
-        <name>router</name>
-        <domain>public.localhost</domain>
+  <connections>
+
+    <service>
+      <!-- Can this connection talk to private services? -->
+      <privileged>true</privileged>
 
-        <services>
-          <service>opensrf.math</service>
-          <service>open-ils.actor</service>
-          <service>open-ils.acq</service>
-          <service>open-ils.auth</service>
-          <service>open-ils.auth_proxy</service>
-          <service>open-ils.booking</service>
-          <service>open-ils.cat</service>
-          <service>open-ils.circ</service>
-          <service>open-ils.collections</service>
-          <service>open-ils.courses</service>
-          <service>open-ils.curbside</service>
-          <service>open-ils.fielder</service>
-          <service>open-ils.pcrud</service>
-          <service>open-ils.permacrud</service>
-          <service>open-ils.reporter</service>
-          <service>open-ils.resolver</service>
-          <service>open-ils.search</service>
-          <service>open-ils.supercat</service>
-          <service>open-ils.url_verify</service>
-          <service>open-ils.vandelay</service>
-          <service>open-ils.serial</service>
-          <service>open-ils.ebook_api</service>
-        </services>
-      </router>
+      <message_bus>
+        <host>127.0.0.1</host>
+        <port>6379</port>
+        <username>opensrf@private</username>
+        <password>password</password>
 
-      <router>
         <!--
-          This is the private router.  All applications must register with 
-          this router, so no explicit <services> section is required
+          Max number of unsent messages Redis will retain in the
+          message stream before discarding the oldest.  This value needs
+          to be *something* or queues will grow unbounded,  service-level
+          request queues especially.  See XREADGROUP MAXLEN.
         -->
-        <name>router</name>
-        <domain>private.localhost</domain>
-      </router>
-    </routers>
-
-    <!-- Our domain should match that of the private router -->
-    <domain>private.localhost</domain>
-    <username>opensrf</username>
-    <passwd>password</passwd>
-    <port>5222</port>
-
-    <!-- 
-      Name of the router used on our private domain.  
-      This should match one of the <name> of the private router above.
-     -->
-    <router_name>router</router_name>
+        <max_queue_size>1000</max_queue_size>
+      </message_bus>
 
-    <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
-    <!--
       <logfile>syslog</logfile>
       <syslog>local0</syslog>
       <actlog>local1</actlog>
-     -->
-    <loglevel>3</loglevel>
-    <settings_config>SYSCONFDIR/opensrf.xml</settings_config>
-  </opensrf>
-  <!-- 
-    The section between <gateway>...</gateway> is a standard OpenSRF C
-    stack configuration file
-  -->
-  <gateway>
-    <client>true</client>
-    <router_name>router</router_name>
+      <loglevel>3</loglevel>
+      <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
+    </service>
 
-    <!-- The gateway connects to the public domain for security -->
-    <domain>public.localhost</domain>
-
-    <!-- This section will be soon deprecated for multi-domain mode... -->
-    <services>
-      <service>opensrf.math</service>
-      <service>opensrf.dbmath</service>
-      <service>open-ils.cat</service>
-      <service>open-ils.search</service>
-      <service>open-ils.circ</service>
-      <service>open-ils.actor</service>
-      <service>open-ils.auth</service>
-      <service>open-ils.auth_proxy</service>
-      <service>open-ils.collections</service>
-      <service>open-ils.reporter</service>
-    </services>
-
-    <!-- jabber login info -->
-    <username>opensrf</username>
-    <passwd>password</passwd>
-    <port>5222</port>
-    <loglevel>3</loglevel>
-    <logfile>LOCALSTATEDIR/log/gateway.log</logfile>
-    <!--
+    <gateway>
+      <!-- This connection CANNOT talk to private services -->
+      <message_bus>
+        <host>127.0.0.1</host>
+        <port>6379</port>
+        <username>opensrf@public</username>
+        <password>password</password>
+      </message_bus>
+      <client>true</client>
+      <!--
       <logfile>syslog</logfile>
       <syslog>local6</syslog>
       <actlog>local1</actlog>
-    -->
-  </gateway>
-  <!-- ======================================================================================== -->
-  <routers>
-    <router>
-      <!-- public router -->
-      <trusted_domains>
-        <!-- 
-          Allow private services to register with this router 
-          and public client to send requests to this router. 
-        -->
-        <server>private.localhost</server>
+      <loglevel>3</loglevel>
+      -->
+      <logfile>LOCALSTATEDIR/log/gateway.log</logfile>
+    </gateway>
+  </connections>
 
-        <!-- 
-          Also allow private clients to send to the router so it
-          can receive error messages
-        -->
-        <client>private.localhost</client>
-        <client>public.localhost</client>
+  <settings_config>/openils/conf/opensrf.xml</settings_config>
 
-      </trusted_domains>
-      <transport>
-        <server>public.localhost</server>
-        <port>5222</port>
-        <unixpath>LOCALSTATEDIR/sock/unix_sock</unixpath>
-        <username>router</username>
-        <password>password</password>
-        <resource>router</resource>
-        <connect_timeout>10</connect_timeout>
-        <max_reconnect_attempts>5</max_reconnect_attempts>
-      </transport>
-      <logfile>LOCALSTATEDIR/log/router-public.log</logfile>
-      <!--
-        <logfile>syslog</logfile>
-        <syslog>local2</syslog>
-      -->
-      <loglevel>2</loglevel>
-    </router>
-    <router>
-      <!-- private router -->
-      <trusted_domains>
-        <server>private.localhost</server>
-        <!-- 
-          Only clients on the private domain can send requests to this router
-         -->
-        <client>private.localhost</client>
-      </trusted_domains>
-      <transport>
-        <server>private.localhost</server>
-        <port>5222</port>
-        <username>router</username>
-        <password>password</password>
-        <resource>router</resource>
-        <connect_timeout>10</connect_timeout>
-        <max_reconnect_attempts>5</max_reconnect_attempts>
-      </transport>
-      <logfile>LOCALSTATEDIR/log/router-private.log</logfile>
-      <!--
-        <logfile>syslog</logfile>
-        <syslog>local2</syslog>
-      -->
-      <loglevel>2</loglevel>
-    </router>
-  </routers>
-  <!-- ======================================================================================== -->
+  <public_services>
+    <service>opensrf.math</service>
+    <service>open-ils.actor</service>
+    <service>open-ils.acq</service>
+    <service>open-ils.auth</service>
+    <service>open-ils.auth_proxy</service>
+    <service>open-ils.booking</service>
+    <service>open-ils.cat</service>
+    <service>open-ils.circ</service>
+    <service>open-ils.collections</service>
+    <service>open-ils.courses</service>
+    <service>open-ils.curbside</service>
+    <service>open-ils.fielder</service>
+    <service>open-ils.pcrud</service>
+    <service>open-ils.permacrud</service>
+    <service>open-ils.reporter</service>
+    <service>open-ils.resolver</service>
+    <service>open-ils.search</service>
+    <service>open-ils.supercat</service>
+    <service>open-ils.url_verify</service>
+    <service>open-ils.vandelay</service>
+    <service>open-ils.serial</service>
+    <service>open-ils.ebook_api</service>
+  </public_services>
+
+  <log_protect>
+    <match_string>open-ils.auth.authenticate.verify</match_string>
+    <match_string>open-ils.auth.authenticate.complete</match_string>
+    <match_string>open-ils.auth.login</match_string>
+    <match_string>open-ils.auth_proxy.login</match_string>
+    <match_string>open-ils.actor.patron.password_reset.commit</match_string>
+    <match_string>open-ils.actor.user.password</match_string>
+    <match_string>open-ils.actor.user.username</match_string>
+    <match_string>open-ils.actor.user.email</match_string>
+    <match_string>open-ils.actor.patron.update</match_string>
+    <match_string>open-ils.cstore.direct.actor.user.create</match_string>
+    <match_string>open-ils.cstore.direct.actor.user.update</match_string>
+    <match_string>open-ils.cstore.direct.actor.user.delete</match_string>
+    <match_string>open-ils.search.z3950.apply_credentials</match_string>
+    <match_string>open-ils.geo</match_string>
+    <match_string>open-ils.actor.geo</match_string>
+  </log_protect>
 
-  <!-- Any methods which match any of these match_string node values will     
-       have their params redacted from lower-level input logging.             
-       Adjust these examples as needed. -->      
-  <shared>
-    <log_protect>
-      <match_string>open-ils.auth.authenticate.verify</match_string>
-      <match_string>open-ils.auth.authenticate.complete</match_string>
-      <match_string>open-ils.auth.login</match_string>
-      <match_string>open-ils.auth_proxy.login</match_string>
-      <match_string>open-ils.actor.patron.password_reset.commit</match_string>
-      <match_string>open-ils.actor.user.password</match_string>
-      <match_string>open-ils.actor.user.username</match_string>
-      <match_string>open-ils.actor.user.email</match_string>
-      <match_string>open-ils.actor.patron.update</match_string>
-      <match_string>open-ils.cstore.direct.actor.user.create</match_string>
-      <match_string>open-ils.cstore.direct.actor.user.update</match_string>
-      <match_string>open-ils.cstore.direct.actor.user.delete</match_string>
-      <match_string>open-ils.search.z3950.apply_credentials</match_string>
-      <match_string>open-ils.geo</match_string>
-      <match_string>open-ils.actor.geo</match_string>
-    </log_protect>
-  </shared>
 </config>