Return-Path: X-Original-To: apmail-qpid-dev-archive@www.apache.org Delivered-To: apmail-qpid-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 7755910559 for ; Tue, 6 Aug 2013 14:33:31 +0000 (UTC) Received: (qmail 59585 invoked by uid 500); 6 Aug 2013 14:33:31 -0000 Delivered-To: apmail-qpid-dev-archive@qpid.apache.org Received: (qmail 59469 invoked by uid 500); 6 Aug 2013 14:33:31 -0000 Mailing-List: contact dev-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list dev@qpid.apache.org Received: (qmail 59460 invoked by uid 99); 6 Aug 2013 14:33:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Aug 2013 14:33:30 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of robbie.gemmell@gmail.com designates 209.85.214.49 as permitted sender) Received: from [209.85.214.49] (HELO mail-bk0-f49.google.com) (209.85.214.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Aug 2013 14:33:24 +0000 Received: by mail-bk0-f49.google.com with SMTP id r7so184772bkg.8 for ; Tue, 06 Aug 2013 07:33:03 -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 :content-type; bh=wZIktt5nijC+jYhOCegEUG53764nqvnGkZ4wadsyYYs=; b=fL2RV11GzlOVjqRQ3utYn1b7Y2ElDxxt/9wm+AqsVQVcdsmCFCb2CgqnI/64mrG3Pp 1xfF6uNzcMeGSYfXAg+nw0uGCL4bdAmJTcH3spthFCfzdExPNN+E3wrf3twRQajUblCX cXfQLItilU6NFoAyYH3OOAHNuovmAY/bkigTItdJ3snCx6t9LX1F9PFoN3csrXHSkCr0 zqxToB6jD/HOfSad1M+F0EBHhuy5VbEVpmQhehlI6YAf3lD1ArEKRMkswVI4hNXsMDgF PXkm5qlvUA75phBi5X5lQxoYqEcOBWPCXZvO8FIBBMMkrn/yqTM4LVfV/fKq3MrDPQ4w 9YnA== MIME-Version: 1.0 X-Received: by 10.204.230.145 with SMTP id jm17mr400103bkb.125.1375799583446; Tue, 06 Aug 2013 07:33:03 -0700 (PDT) Received: by 10.204.60.197 with HTTP; Tue, 6 Aug 2013 07:33:03 -0700 (PDT) In-Reply-To: <7CC07803056CDC40A2340D28F915D91B355C34@NOIX10HMNOI02.AMER.DELL.COM> References: <1375437360635-7588664.post@n2.nabble.com> <7CC07803056CDC40A2340D28F915D91B355743@NOIX10HMNOI02.AMER.DELL.COM> <7CC07803056CDC40A2340D28F915D91B355C34@NOIX10HMNOI02.AMER.DELL.COM> Date: Tue, 6 Aug 2013 15:33:03 +0100 Message-ID: Subject: Re: STARTING/STOPPING Apache Qpid from Maven From: Robbie Gemmell To: "dev@qpid.apache.org" Content-Type: multipart/alternative; boundary=485b395e7527744c6604e3484d62 X-Virus-Checked: Checked by ClamAV on apache.org --485b395e7527744c6604e3484d62 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Prikshit, As mentioned, if you are going to deploy RabbitMQ in production then I think the only advisable course is that you actually use RabbitMQ in your testing, anything else renders it of limited use as it isn't at all representative. That is of course assuming a substitute is able to satify the requirements to perform the testing, if you were for example reliant on any RabbitMQ specific features or behaviours then it is possible you will be unable to replicate this at all with a different system. That said, as you have asked, and I am sure you could discover yourself with a bit more searching, starting the Qpid broker within the same JVM is done using the org.apache.qpid.server.Broker and org.apache.qpid.server.BrokerOptions classes, as follows: BrokerOptions options =3D new BrokerOptions(); //Perform any desired option setting, //e.g. updating broker configuration store type or path Broker broker =3D new Broker(); broker.startup(options); You can see this in use as one of the ways we start the broker in our testing, via the QpidBrokerTestCase class: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/or= g/apache/qpid/test/utils/QpidBrokerTestCase.java?revision=3D1502835&view=3D= co The class itself is rather rather unwieldly so if you go this route I wouldn't recommend you use it directly but rather create your own. In terms of configuring the broker options, you may want to change the broker configuration store type and/or path, or initial configuration path, in order to supply particular configuration for specific tests etc. You can find more details of the broker configuration store in the documentation at http://qpid.apache.org/releases/qpid-0.22/java-broker/book/Java-Broker-Conf= iguring-And-Managing.html#Java-Broker-Configuring-And-Managing-Configuratio= n-Store(this is written from the perspective of command line usage, but the concepts translate fairly easily to use of the BrokerOptions object). Robbie On 6 August 2013 09:21, prikshit wrote: > Hi Robbie, > > We need to perform integration testing, and creating the actual > environment can be a complex and lengthy process. I admit apache qpid is > not the actual representation of the system, As on production we are usi= ng > RabbitMQ. > > Hope now I am clear about scenario. Can you guide for any JVM broker whic= h > is close to rabbit MQ , which I can use for integration testing other tha= n > ApacheQpid. Or apache Qpid is the best one. > > Thx, > Prikshit > From: Robbie Gemmell [via Apache Qpid developers] [mailto: > ml-node+s2158895n7588724h24@n2.nabble.com] > Sent: Tuesday, August 06, 2013 3:17 AM > To: Chauhan, Prikshit > Subject: Re: STARTING/STOPPING Apache Qpid from Maven > > Hi Prikshit, > > Is is possible to launch the Qpid broker within the same JVM and we can > point out how to do this if you decide to go down that route, but I'm sti= ll > a little unclear on your actual intentions and whether this would really = be > a good fit. Would you be looking to use the Qpid broker in actual > deployment of the application, or only for use in the same JVM during > testing whilst continuing to use the RabbitMQ broker for the final > deployment? > > If the latter, we normally wouldn't recommend such an approach as your > testing then wouldn't be representative of your actual system. Whilst it > can obviously be nicer to have components in the same JVM at times, is th= is > really a hard requirement for you, i.e. is there a particular reason that > having your tests launch the RabbitMQ broker as a standalone process isn'= t > workable for you? What has your testing to date been doing in this area? > > Robbie > > On 5 August 2013 15:24, prikshit <[hidden > email]> wrote: > > > Hi Robbie, > > > > I need to have a broker which is running with in same JVM... and using > > existing RabbitMQ clients. > > > > Thx, > > Prikshit > > From: Robbie Gemmell [via Apache Qpid developers] [mailto: > > [hidden email]] > > Sent: Monday, August 05, 2013 7:23 PM > > To: Chauhan, Prikshit > > Subject: Re: STARTING/STOPPING Apache Qpid from Maven > > > > Hi Prikshit, > > > > Could you elaborate a little on exactly what you actually mean, as it > isn't > > entirely clear? > > > > E.g are you looking to use maven to start/stop the broker for use by so= me > > external testing taking place, or are you looking for an embedded broke= r > to > > use during tests running within the same JVM? Would you be looking to u= se > > the Qpid broker with pre-existing integration tests for an application > that > > would be using RabbitMQ clients, or are you looking to swap wholesale t= o > > use Qpid clients as well? > > > > What is preventing you starting/stopping RabbitMQ using Maven? Obviousl= y > it > > isn't written in Java, but that wouldnt seem to preclude it from being > > started as an external process. > > > > Regards, > > > > Robbie > > > > Hi, > > > > For my integration testing, i am planning to migrate from rabbitMQ to > > ApacheQpid, coz of > > --> Maven do't support starting/ stopping RabbitMQ server > > > > Please suggest me should i use Apache Qpid to remove this dependency. > > > > Or do i have any other option. > > > > Thx, > > Prikshit > > > > > > > > -- > > View this message in context: > > > > > http://apache-qpid-developers.2158895.n2.nabble.com/STARTING-STOPPING-Apa= che-Qpid-from-Maven-tp7588664.html > > Sent from the Apache Qpid developers mailing list archive at Nabble.com= . > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [hidden > > email] > > For additional commands, e-mail: [hidden > > email] > > > > ________________________________ > > If you reply to this email, your message will be added to the discussio= n > > below: > > > > > http://apache-qpid-developers.2158895.n2.nabble.com/STARTING-STOPPING-Apa= che-Qpid-from-Maven-tp7588664p7588701.html > > To unsubscribe from STARTING/STOPPING Apache Qpid from Maven, click her= e< > > >. > > NAML< > > > http://apache-qpid-developers.2158895.n2.nabble.com/template/NamlServlet.= jtp?macro=3Dmacro_viewer&id=3Dinstant_html%21nabble%3Aemail.naml&base=3Dnab= ble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace= -nabble.view.web.template.NodeNamespace&breadcrumbs=3Dnotify_subscribers%21= nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email= %21nabble%3Aemail.naml > > > > > > > > > > > > > -- > > View this message in context: > > > http://apache-qpid-developers.2158895.n2.nabble.com/STARTING-STOPPING-Apa= che-Qpid-from-Maven-tp7588664p7588703.html > > Sent from the Apache Qpid developers mailing list archive at Nabble.com= . > > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > > http://apache-qpid-developers.2158895.n2.nabble.com/STARTING-STOPPING-Apa= che-Qpid-from-Maven-tp7588664p7588724.html > To unsubscribe from STARTING/STOPPING Apache Qpid from Maven, click here< > http://apache-qpid-developers.2158895.n2.nabble.com/template/NamlServlet.= jtp?macro=3Dunsubscribe_by_code&node=3D7588664&code=3DcHJpa3NoaXRfY2hhdWhhb= kBkZWxsLmNvbXw3NTg4NjY0fDIxMDc5MTkxNDU=3D > >. > NAML< > http://apache-qpid-developers.2158895.n2.nabble.com/template/NamlServlet.= jtp?macro=3Dmacro_viewer&id=3Dinstant_html%21nabble%3Aemail.naml&base=3Dnab= ble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace= -nabble.view.web.template.NodeNamespace&breadcrumbs=3Dnotify_subscribers%21= nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email= %21nabble%3Aemail.naml > > > > > > > -- > View this message in context: > http://apache-qpid-developers.2158895.n2.nabble.com/STARTING-STOPPING-Apa= che-Qpid-from-Maven-tp7588664p7588728.html > Sent from the Apache Qpid developers mailing list archive at Nabble.com. > --485b395e7527744c6604e3484d62--