In Memory Message store will be 0 when the source files get updated.

View: New views
4 Messages — Rating Filter:   Alert me  

In Memory Message store will be 0 when the source files get updated.

by dushan abeyruwan-2 :: Rate this Message:

| View Threaded | Show Only this Message

Hi
   Recently found issue when using In memory message store,

Description:

Is $summary correct, because the docs says the messages are removed in case of a server restart; [ "So in case of a ESB restart, all the messages stored will be lost."].

Steps:
--------
- Start ESB with sample 700
- Send about 10 messages to sample's "MyStore" using soap-ui. Observer how the messages count is correctly updated in "Manage Message Stores" pages.
- Now create another in-memory store.
- Go to source view and replace "Mystore" in 'main' sequence's 'store' mediator with the new in-memory store.

 <sequence name="main">
      <in>
         <log level="full"/>
         <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
         <store messageStore="10messages" sequence="onStoreSequence"/>
      </in>
      <description>The main sequence for the message mediation</description>
   </sequence>

-Now go back to Manage > Service Bus > Message Stores and chck the "available message stores" list -->> the message count of "MyStore" which we were using earlier has turned to 0.


The issues is may be at the following location

        if (!definitions.getQName().equals(XMLConfigConstants.DEFINITIONS_ELT)) {
            throw new SynapseException(
                    "Wrong QName for this configuration factory " + definitions.getQName());
        }
        SynapseConfiguration config = SynapseConfigUtils.newConfiguration();              
        config.setDefaultQName(definitions.getQName());


  *
     * @return a SynapseConfiguration instance
     */
    public static SynapseConfiguration newConfiguration() {
        SynapseConfiguration synConfig = new SynapseConfiguration();
        Properties synapseProps = SynapsePropertiesLoader.loadSynapseProperties();
        String propValue = synapseProps.getProperty("synapse.observers");
        if (propValue != null) {


seems like every time the source get update  it will create new SynapseConfiguration which meas a previously created Message store information will be lost

need any suggestions on this

cheers
Dushan

Re: In Memory Message store will be 0 when the source files get updated.

by Charith Wickramarachchi :: Rate this Message:

| View Threaded | Show Only this Message


In the InMemory Message Store Stored Messages are associated with the MessageStore Object itself. So in case of a Server restart/ Config re-load that messages will be lost as It will create new Configuration Object/s. 

For the persistence behavior the ideal solution is to have a Persistent Message Store (ex : JMS MessageStore  DBMessage Store etc..)

--Charith


On Wed, Jul 25, 2012 at 6:49 PM, dushan abeyruwan <dushansynapse@...> wrote:
Hi
   Recently found issue when using In memory message store,

Description:

Is $summary correct, because the docs says the messages are removed in case of a server restart; [ "So in case of a ESB restart, all the messages stored will be lost."].

Steps:
--------
- Start ESB with sample 700
- Send about 10 messages to sample's "MyStore" using soap-ui. Observer how the messages count is correctly updated in "Manage Message Stores" pages.
- Now create another in-memory store.
- Go to source view and replace "Mystore" in 'main' sequence's 'store' mediator with the new in-memory store.

 <sequence name="main">
      <in>
         <log level="full"/>
         <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
         <store messageStore="10messages" sequence="onStoreSequence"/>
      </in>
      <description>The main sequence for the message mediation</description>
   </sequence>

-Now go back to Manage > Service Bus > Message Stores and chck the "available message stores" list -->> the message count of "MyStore" which we were using earlier has turned to 0.


The issues is may be at the following location

        if (!definitions.getQName().equals(XMLConfigConstants.DEFINITIONS_ELT)) {
            throw new SynapseException(
                    "Wrong QName for this configuration factory " + definitions.getQName());
        }
        SynapseConfiguration config = SynapseConfigUtils.newConfiguration();              
        config.setDefaultQName(definitions.getQName());


  *
     * @return a SynapseConfiguration instance
     */
    public static SynapseConfiguration newConfiguration() {
        SynapseConfiguration synConfig = new SynapseConfiguration();
        Properties synapseProps = SynapsePropertiesLoader.loadSynapseProperties();
        String propValue = synapseProps.getProperty("synapse.observers");
        if (propValue != null) {


seems like every time the source get update  it will create new SynapseConfiguration which meas a previously created Message store information will be lost

need any suggestions on this

cheers
Dushan



--
Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/


Re: In Memory Message store will be 0 when the source files get updated.

by Dushan Abeyruwan :: Rate this Message:

| View Threaded | Show Only this Message

Hi 
   So this is a kind of a limitation (which means) the In Memory only persists as long as Server does not restart which is VALID and as long as the configuration is not reloaded (?) anyway thanks for you kind response on this matter

cheers
Dushan

On Wed, Jul 25, 2012 at 8:44 PM, Charith Wickramarachchi <charith.dhanushka@...> wrote:

In the InMemory Message Store Stored Messages are associated with the MessageStore Object itself. So in case of a Server restart/ Config re-load that messages will be lost as It will create new Configuration Object/s. 

For the persistence behavior the ideal solution is to have a Persistent Message Store (ex : JMS MessageStore  DBMessage Store etc..)

--Charith



On Wed, Jul 25, 2012 at 6:49 PM, dushan abeyruwan <dushansynapse@...> wrote:
Hi
   Recently found issue when using In memory message store,

Description:

Is $summary correct, because the docs says the messages are removed in case of a server restart; [ "So in case of a ESB restart, all the messages stored will be lost."].

Steps:
--------
- Start ESB with sample 700
- Send about 10 messages to sample's "MyStore" using soap-ui. Observer how the messages count is correctly updated in "Manage Message Stores" pages.
- Now create another in-memory store.
- Go to source view and replace "Mystore" in 'main' sequence's 'store' mediator with the new in-memory store.

 <sequence name="main">
      <in>
         <log level="full"/>
         <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
         <store messageStore="10messages" sequence="onStoreSequence"/>
      </in>
      <description>The main sequence for the message mediation</description>
   </sequence>

-Now go back to Manage > Service Bus > Message Stores and chck the "available message stores" list -->> the message count of "MyStore" which we were using earlier has turned to 0.


The issues is may be at the following location

        if (!definitions.getQName().equals(XMLConfigConstants.DEFINITIONS_ELT)) {
            throw new SynapseException(
                    "Wrong QName for this configuration factory " + definitions.getQName());
        }
        SynapseConfiguration config = SynapseConfigUtils.newConfiguration();              
        config.setDefaultQName(definitions.getQName());


  *
     * @return a SynapseConfiguration instance
     */
    public static SynapseConfiguration newConfiguration() {
        SynapseConfiguration synConfig = new SynapseConfiguration();
        Properties synapseProps = SynapsePropertiesLoader.loadSynapseProperties();
        String propValue = synapseProps.getProperty("synapse.observers");
        if (propValue != null) {


seems like every time the source get update  it will create new SynapseConfiguration which meas a previously created Message store information will be lost

need any suggestions on this

cheers
Dushan



--
Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/




--
Dushan Abeyruwan
Senior Software Engineer
Integration Technologies Team
WSO2 Inc. http://wso2.com/
Mobile:(+94)714408632


Re: In Memory Message store will be 0 when the source files get updated.

by Hiranya Jayathilaka-3 :: Rate this Message:

| View Threaded | Show Only this Message

To me this behavior is good enough for the in-memory case. A full config update from Synapse PoV is equivalent to a server restart. If somebody need persistence, they need to use a persistent message store implementation (like a JMS store). The in-memory store doesn't provide that.

Thanks,
Hiranya

On Wed, Jul 25, 2012 at 9:17 PM, Dushan Abeyruwan <dushan@...> wrote:
Hi 
   So this is a kind of a limitation (which means) the In Memory only persists as long as Server does not restart which is VALID and as long as the configuration is not reloaded (?) anyway thanks for you kind response on this matter

cheers
Dushan


On Wed, Jul 25, 2012 at 8:44 PM, Charith Wickramarachchi <charith.dhanushka@...> wrote:

In the InMemory Message Store Stored Messages are associated with the MessageStore Object itself. So in case of a Server restart/ Config re-load that messages will be lost as It will create new Configuration Object/s. 

For the persistence behavior the ideal solution is to have a Persistent Message Store (ex : JMS MessageStore  DBMessage Store etc..)

--Charith



On Wed, Jul 25, 2012 at 6:49 PM, dushan abeyruwan <dushansynapse@...> wrote:
Hi
   Recently found issue when using In memory message store,

Description:

Is $summary correct, because the docs says the messages are removed in case of a server restart; [ "So in case of a ESB restart, all the messages stored will be lost."].

Steps:
--------
- Start ESB with sample 700
- Send about 10 messages to sample's "MyStore" using soap-ui. Observer how the messages count is correctly updated in "Manage Message Stores" pages.
- Now create another in-memory store.
- Go to source view and replace "Mystore" in 'main' sequence's 'store' mediator with the new in-memory store.

 <sequence name="main">
      <in>
         <log level="full"/>
         <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
         <store messageStore="10messages" sequence="onStoreSequence"/>
      </in>
      <description>The main sequence for the message mediation</description>
   </sequence>

-Now go back to Manage > Service Bus > Message Stores and chck the "available message stores" list -->> the message count of "MyStore" which we were using earlier has turned to 0.


The issues is may be at the following location

        if (!definitions.getQName().equals(XMLConfigConstants.DEFINITIONS_ELT)) {
            throw new SynapseException(
                    "Wrong QName for this configuration factory " + definitions.getQName());
        }
        SynapseConfiguration config = SynapseConfigUtils.newConfiguration();              
        config.setDefaultQName(definitions.getQName());


  *
     * @return a SynapseConfiguration instance
     */
    public static SynapseConfiguration newConfiguration() {
        SynapseConfiguration synConfig = new SynapseConfiguration();
        Properties synapseProps = SynapsePropertiesLoader.loadSynapseProperties();
        String propValue = synapseProps.getProperty("synapse.observers");
        if (propValue != null) {


seems like every time the source get update  it will create new SynapseConfiguration which meas a previously created Message store information will be lost

need any suggestions on this

cheers
Dushan



--
Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/




--
Dushan Abeyruwan
Senior Software Engineer
Integration Technologies Team
WSO2 Inc. http://wso2.com/




--
Hiranya Jayathilaka
Associate Technical Lead;
WSO2 Inc.;  http://wso2.org
E-mail: hiranya@...;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com