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 <[email protected]>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/
