Return-Path: X-Original-To: apmail-synapse-dev-archive@www.apache.org Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E181DD57C for ; Wed, 25 Jul 2012 17:50:04 +0000 (UTC) Received: (qmail 36810 invoked by uid 500); 25 Jul 2012 17:50:04 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 36759 invoked by uid 500); 25 Jul 2012 17:50:04 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 36752 invoked by uid 99); 25 Jul 2012 17:50:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2012 17:50:04 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hiranya911@gmail.com designates 209.85.160.170 as permitted sender) Received: from [209.85.160.170] (HELO mail-gh0-f170.google.com) (209.85.160.170) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2012 17:49:58 +0000 Received: by ghbg2 with SMTP id g2so916516ghb.15 for ; Wed, 25 Jul 2012 10:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BKZlhfcA1WSY3W9dVmDg4o7rL9IETPyuj0FOOJzUOHg=; b=IKJQ/OEBICSGy0eBbvQqmek4CmqJojH9Ns+5Vz8RcgCI4WWuu57FMBw8Nv2MTFIFAv IkQYMrpH17UQLxnnOKLI4ltpRvkbT0fTIW8QqAdcaEKqxLT0nQis/0hmEv/674dlT54b aOLsqnZqfrmOHXyrC1EpSngfnb+Eg4dXGsKBF5WVsk2dyev4I4NqwNt/MI+cdlgVtolJ 7Pmr6ZBdp9lIq6cR7MYIa+mdj/0iLLz1Ym2rWWAGX0/FitVbKrhQKd5asvHvEvuFKYcl ABkysyL7fz2qkVbiiU/GRi+kQnDEAYvwHZxoSOMv9xqmWO9maqd87amJ+PYcu6A2K6oP 454Q== MIME-Version: 1.0 Received: by 10.60.29.169 with SMTP id l9mr37463011oeh.14.1343238577321; Wed, 25 Jul 2012 10:49:37 -0700 (PDT) Received: by 10.76.3.70 with HTTP; Wed, 25 Jul 2012 10:49:37 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 Jul 2012 23:19:37 +0530 Message-ID: Subject: Re: In Memory Message store will be 0 when the source files get updated. From: Hiranya Jayathilaka To: dev@synapse.apache.org Cc: "charith.dhanushka" Content-Type: multipart/alternative; boundary=e89a8ff256663ff8b404c5ab1aed --e89a8ff256663ff8b404c5ab1aed Content-Type: text/plain; charset=ISO-8859-1 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 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@gmail.com> 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@gmail.com> 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. >>> >>> >>> >>> >>> >>> >>> >>> The main sequence for the message >>> mediation >>> >>> >>> -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* > > -- Hiranya Jayathilaka Associate Technical Lead; WSO2 Inc.; http://wso2.org E-mail: hiranya@wso2.com; Mobile: +94 77 633 3491 Blog: http://techfeast-hiranya.blogspot.com --e89a8ff256663ff8b404c5ab1aed Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable To me this behavior is good enough for the in-memory case. A full config up= date from Synapse PoV is equivalent to a server restart. If somebody need p= ersistence, they need to use a persistent message store implementation (lik= e 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@wso2.com> wrote:
Hi=A0
=A0 =A0So this is a kind of a=A0li= mitation=A0(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 reloade= d (?)=A0anyway thanks for you kind response on this matter

cheers
Dushan


<= div class=3D"gmail_quote">On Wed, Jul 25, 2012 at 8:44 PM, Charith Wickrama= rachchi <charith.dhanushka@gmail.com> wrote:

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

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

--Ch= arith



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

Description:

Is $summary correct, b= ecause 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.&= quot;].

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

=A0<sequence name=3D"main&q= uot;>
=A0 =A0 =A0 <in>
=A0 =A0 =A0 =A0 =A0<log level=3D"full&qu= ot;/>
=A0 =A0 =A0 =A0 =A0<property name=3D"FORCE_SC_ACCEPTED= " value=3D"true" scope=3D"axis2"/>
=A0 =A0 = =A0 =A0 =A0<store messageStore=3D"10messages" sequence=3D"= ;onStoreSequence"/>
=A0 =A0 =A0 </in>
=A0 =A0 =A0 <description>The main sequenc= e for the message mediation</description>
=A0 =A0</sequence>= ;

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

The issues is may be at the following location

=A0=A0=A0=A0= =A0=A0=A0 if (!definitions.getQName().equals(XMLConfigConstants.DEFINITIONS= _ELT)) {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 throw new SynapseException(=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "Wrong QNa= me for this configuration factory " + definitions.getQName());
=A0=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0=A0=A0=A0=A0 SynapseConfiguration confi= g =3D SynapseConfigUtils.newConfiguration();=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0
=A0=A0=A0=A0=A0=A0=A0 config.setDefaultQName(definitions.g= etQName());


=A0 *
=A0=A0=A0=A0 * @return a SynapseConfigurati= on instance
=A0=A0=A0=A0 */
=A0=A0=A0 public static SynapseConfiguration newConfigur= ation() {
=A0=A0=A0=A0=A0=A0=A0 SynapseConfiguration synConfig =3D new S= ynapseConfiguration();
=A0=A0=A0=A0=A0=A0=A0 Properties synapseProps =3D= SynapsePropertiesLoader.loadSynapseProperties();
=A0=A0=A0=A0=A0=A0=A0 String propValue =3D synapseProps.getProperty("s= ynapse.observers");
=A0=A0=A0=A0=A0=A0=A0 if (propValue !=3D null) = {


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

need any suggestions on this

cheers
Dushan



--
Charith Dhanushka Wickramarachchi
http://charithwik= i.blogspot.com/




--
Dushan Ab= eyruwan
Senior Software Engineer
Integration Technologies Team<= /i>
WSO2 Inc.=A0http://wso2.com/




--
Hiranya Jaya= thilaka
Associate Technical Lead;
WSO2 Inc.;=A0 http://wso2.org
E-mail: hiranya@wso2.com;=A0 Mobile: +94 77 = 633 3491
Blog: h= ttp://techfeast-hiranya.blogspot.com
--e89a8ff256663ff8b404c5ab1aed--