Uploaded image for project: 'Synapse'
  1. Synapse
  2. SYNAPSE-916

JDBC Message Store Support For Synapse

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • FUTURE
    • None
    • Core
    • Synapse ESB, JDBC supporting database

    Description

      The aim of this improvement is to enable JDBC databases to act as message stores for Synapse ESB. Currently Synapse comes with JMS Message Stores as the persistent store and have drawbacks. Since JDBC Message store uses relational databases to store messages, Synapse will be able to overcome those disadvantages and will benefited with an easy way to persist messages.
      After applying patch, you need to add the respective jdbc driver to 'lib' folder of Synapse and add message Store as follows. (In here I'm using mysql-jdbc-connector)

      <store messageStore="MyStore"/>

      <messageStore class="org.apache.synapse.message.store.jdbc.JDBCMessageStore" name="MyStore">

      <parameter name="store.jdbc.driver">com.mysql.jdbc.Driver</parameter>
      <parameter name="store.jdbc.connection.url">jdbc:mysql://localhost:3306/mystore</parameter>
      <parameter name="store.jdbc.username">root</parameter>
      <parameter name="store.jdbc.password"></parameter>

      <parameter name="store.jdbc.table">store_table</parameter>

      </messageStore>

      Configuration parameter list can be used as follows if you want to add a datasource:

      <parameter name="store.jdbc.dsName">reportDB</parameter>
      <parameter name="store.jdbc.icClass">com.sun.jndi.rmi.registry.RegistryContextFactory</parameter>
      <parameter name="store.jdbc.connection.url">rmi://localhost:2199</parameter>
      <parameter name="store.jdbc.username">root</parameter>
      <parameter name="store.jdbc.password"></parameter>
      <parameter name="store.jdbc.table">store_table</parameter>

      Testing:
      I have already tested the JDBC Message Store with mysql databases using the configuration given.

      To create table:

      CREATE TABLE 'store_table' (
      'indexId' BIGINT( 20 ) NOT NULL ,
      'msg_id' VARCHAR( 200 ) NOT NULL ,
      'message' BLOB NOT NULL ,
      PRIMARY KEY ( 'indexId' )
      )

      Attachments

        1. JDBC_Message_Store.patch
          60 kB
          Buddhima Wijeweera
        2. JDBC_Store_Patch.patch
          59 kB
          Buddhima Wijeweera

        Activity

          People

            charith Charith Wickramarachchi
            buddhima Buddhima Wijeweera
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: