qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbie Gemmell <robbie.gemm...@gmail.com>
Subject Re: STARTING/STOPPING Apache Qpid from Maven
Date Tue, 06 Aug 2013 14:33:03 GMT
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 = new BrokerOptions();
//Perform any desired option setting,
//e.g. updating broker configuration store type or path
Broker broker = 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/org/apache/qpid/test/utils/QpidBrokerTestCase.java?revision=1502835&view=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-Configuring-And-Managing.html#Java-Broker-Configuring-And-Managing-Configuration-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 <prikshit_chauhan@dell.com> 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 using
> RabbitMQ.
>
> Hope now I am clear about scenario. Can you guide for any JVM broker which
> is close to rabbit MQ , which I can use for integration testing other than
> 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 still
> 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 this
> 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]</user/SendEmail.jtp?type=node&node=7588724&i=0>> 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]</user/SendEmail.jtp?type=node&node=7588724&i=1>]
> > 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 some
> > external testing taking place, or are you looking for an embedded broker
> to
> > use during tests running within the same JVM? Would you be looking to use
> > the Qpid broker with pre-existing integration tests for an application
> that
> > would be using RabbitMQ clients, or are you looking to swap wholesale to
> > use Qpid clients as well?
> >
> > What is preventing you starting/stopping RabbitMQ using Maven? Obviously
> 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-Apache-Qpid-from-Maven-tp7588664.html
> > Sent from the Apache Qpid developers mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden
> > email]</user/SendEmail.jtp?type=node&node=7588701&i=0>
> > For additional commands, e-mail: [hidden
> > email]</user/SendEmail.jtp?type=node&node=7588701&i=1>
> >
> > ________________________________
> > 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-Apache-Qpid-from-Maven-tp7588664p7588701.html
> > To unsubscribe from STARTING/STOPPING Apache Qpid from Maven, click here<
> > >.
> > NAML<
> >
> http://apache-qpid-developers.2158895.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%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-Apache-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-Apache-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=unsubscribe_by_code&node=7588664&code=cHJpa3NoaXRfY2hhdWhhbkBkZWxsLmNvbXw3NTg4NjY0fDIxMDc5MTkxNDU=
> >.
> NAML<
> http://apache-qpid-developers.2158895.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%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-Apache-Qpid-from-Maven-tp7588664p7588728.html
> Sent from the Apache Qpid developers mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message