Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • transport.hl7.corePoolSize: the core number of threads in the pool. Default is 100.
  • transport.hl7.maxPoolSize: the maximum number of threads that can be in the pool. Default is 200.
  • transport.hl7.idleThreadKeepAlive: the time in milliseconds to keep idle threads alive before releasing them. Default is 10000 (10 seconds). 

...

Storing messages

You can use the HL7 message store to automatically store HL7 messages, allowing you to audit and replay messages as needed. The HL7 store is a custom message store implementation on top of Open JPA. To use the message store, you take the following steps:

  1. Create an empty database in your RDBMS, and then create a message store configuration that points to that database.
  2. Create a sequence that points to that message store configuration.

For example:

Code Block
languagehtml/xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">

   <proxy name="HL7Store" startOnLoad="true" trace="disable" transports=”hl7”>
      <description/>
      <target>
         <inSequence>
            <property name="HL7_RESULT_MODE" value="ACK" scope="axis2"/>
            <log level="full"/>
            <property name="messageType" value="application/edi-hl7" scope="axis2"/>
            <clone>
               <target sequence="StoreSequence"/>
               <target sequence="SendSequence"/>
            </clone>
         </inSequence>
      </target>
      <parameter name="transport.hl7.AutoAck">false</parameter>
      <parameter name="transport.hl7.Port">55557</parameter>
      <parameter name="transport.hl7.ValidateMessage">false</parameter>
   </proxy>

   <sequence name="StoreSequence">
      <property name="OUT_ONLY" value="true"/>
      <store messageStore="HL7StoreJPA"/>
   </sequence>

   <sequence name="SendSequence">
      <in>
         <send>
            <endpoint>
               <address uri="hl7://localhost:9988"/>
            </endpoint>
         </send>
      </in>
      <out>
         <log level="full"/>
         <drop/>
      </out>
   </sequence>

   <messageStore class="org.wso2.carbon.business.messaging.hl7.store.jpa.JPAStore"
                 name="HL7StoreJPA">
      <parameter name="openjpa.ConnectionDriverName">org.apache.commons.dbcp.BasicDataSource</parameter>
      <parameter name="openjpa.ConnectionProperties">DriverClassName=com.mysql.jdbc.Driver, Url=jdbc:mysql://localhost/hl7storejpa,  MaxActive=100,  MaxWait=10000,  TestOnBorrow=true,  Username=root,  Password=root</parameter>
      <parameter name="openjpa.jdbc.DBDictionary">blobTypeName=LONGBLOB</parameter>
   </messageStore>

</definitions>

...