You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Morpheous <ta...@hotmail.com> on 2008/06/25 00:26:02 UTC

C++ only solution (is this possible)?

I recently came accross CMS/ActiveMQ-CPP. I have been very impressed by the
work done so far. After several days of revisiting the project website
though - it is still not clear to me whether I can build a (C++ only)
distributed system using CMS and ActiveMQ-CPP.

Just when things seem to be getting clearer in the documentation, I come
across a reference to Java, which seems to suggest that you cant use this
framework without a Java component (I hope I am mistaken).

I have a C++ application, that I want to maintain as pure C++ (no mixing
with Java or any other language). I want to create a distributed system
(supporting P2P messaging, Publish/subscribe messaging and distributed
queues). It appears that ActiveMQ-CPP is capable of doing all that, but it
is not clear if I am *forced* to bring Java into the mix or not.

My C++ applications will be mostly consumers, though some will be Producers
(and some both producers/consumers). The idea is to use an existing C++
framework (hopefully ActiveMQ-CPP), to provide the MOM infrastructure -
instead of "rolling my own".

Can anyone please shed light on whether I can use CMS/ActiveMQ-CPP in a *C++
ONLY* solution?

Thanks
-- 
View this message in context: http://www.nabble.com/C%2B%2B-only-solution-%28is-this-possible%29--tp18101121p18101121.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


RE: C++ only solution (is this possible)?

Posted by Morpheous <ta...@hotmail.com>.
Thanks Tim, Thats pretty much, all I need to get started. Once again, thanks
for your help

-- 
View this message in context: http://www.nabble.com/C%2B%2B-only-solution-%28is-this-possible%29--tp18101121p18102458.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


RE: C++ only solution (is this possible)?

Posted by "Bish, Tim" <Ti...@Sensis.com>.
Comments are inline:

> 
> 1). I suppose I'll need to download and install the backend itself
> (ActiveMQ) - are there any instructions as to how to install this and
get
> it
> working with C++ clients (via CMS/ActiveMQ-CPP)?

There's a ton of documentation on installing and configuring the Broker
on the ActiveMQ site, here's a link to the getting started page:
http://activemq.apache.org/version-5-getting-started.html

The ActiveMQ-CPP code ships with a fairly comprehensive example that
shows how to create a connection to the broker and send messages.  This
is all you really need to look at to see what your producers and
consumer need to do.  Also you can look at our integration test suite to
see how we exercise all the various features that we support.  

> 
> 2). Can messages have "guaranteed" or "assured" delivery (how is this
> setup
> in the framework)?

There are a couple ways to tackle this based on what you are trying to
do.  I'd recommend looking at the Sun JMS tutorial to get a feel for
what JMS brings to the table.  It sounds like you'd want to use
something like a durable consumer since topics seem to be what you are
interested in using.  

Take a look at the FAQ page on the ActiveMQ main site as well, this
answers a lot of questions along these lines as well.

> 
> 3). I would like to have remote clients invoke methods on some of my
C++
> clients. I am thinking of using my own version of RPC/HTTP. Is this
> something that ActiveMQ-CPP can help with (i.e. in terms of
implementing
> an
> SOA [Service Oriented Architecture])?

You'd need to build this sort of framework on top of ActiveMQ-CPP.  The
client code only deals with getting the messages from point A to B.  If
you want to emulate a SOAP style RPC mechanism for instance then that
would be on top of the messaging tear since we don't know at our level
what your messages mean we can't really do that step.  Certainly your
messages could just be SOAP envelopes that are sent using ActiveMQ as
TextMessage's then your framework could take it from there.

Regards
Tim.

RE: C++ only solution (is this possible)?

Posted by Morpheous <ta...@hotmail.com>.
Hi Tim,

Thanks for the clarification. You are quite right, so long as the C++
clients can talk to each other, the language used to implement the backend
is not a major issue (although I cant help worrying about [possible]
performance hit due to data marshalling + running in VM etc).

I have a few more questions, now that things have become clearer:

1). I suppose I'll need to download and install the backend itself
(ActiveMQ) - are there any instructions as to how to install this and get it
working with C++ clients (via CMS/ActiveMQ-CPP)?

2). Can messages have "guaranteed" or "assured" delivery (how is this setup
in the framework)?

3). I would like to have remote clients invoke methods on some of my C++
clients. I am thinking of using my own version of RPC/HTTP. Is this
something that ActiveMQ-CPP can help with (i.e. in terms of implementing an
SOA [Service Oriented Architecture])?

-- 
View this message in context: http://www.nabble.com/C%2B%2B-only-solution-%28is-this-possible%29--tp18101121p18101784.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


RE: C++ only solution (is this possible)?

Posted by "Bish, Tim" <Ti...@Sensis.com>.
ActiveMQ-CPP is only a client so in one sense yes you are forced to
bring java into the mix.  However this is only from the standpoint that
all your C++ clients need a message broker and the broker happens to be
written in Java.  The clients themselves are pure C++ client using
ActiveMQ-CPP as their conduit to message each other; the broker manages
all the plumbing behind the scenes to pass the messages back and forth
and persist them if needed etc.  So somewhere on your network you need
to run a broker.  So then the question is does it really matter what
language the broker is written in or does it only matter that all your
C++ clients can talk.

So the short answer is yes you need java installed somewhere, but only
on the machine that runs the broker, everywhere else your clients could
all be C++ applications.

Does that help?

Regards
Tim.

> -----Original Message-----
> From: Morpheous [mailto:takashi_949@hotmail.com]
> Sent: Tuesday, June 24, 2008 3:26 PM
> To: users@activemq.apache.org
> Subject: C++ only solution (is this possible)?
> 
> 
> I recently came accross CMS/ActiveMQ-CPP. I have been very impressed
by
> the
> work done so far. After several days of revisiting the project website
> though - it is still not clear to me whether I can build a (C++ only)
> distributed system using CMS and ActiveMQ-CPP.
> 
> Just when things seem to be getting clearer in the documentation, I
come
> across a reference to Java, which seems to suggest that you cant use
this
> framework without a Java component (I hope I am mistaken).
> 
> I have a C++ application, that I want to maintain as pure C++ (no
mixing
> with Java or any other language). I want to create a distributed
system
> (supporting P2P messaging, Publish/subscribe messaging and distributed
> queues). It appears that ActiveMQ-CPP is capable of doing all that,
but it
> is not clear if I am *forced* to bring Java into the mix or not.
> 
> My C++ applications will be mostly consumers, though some will be
> Producers
> (and some both producers/consumers). The idea is to use an existing
C++
> framework (hopefully ActiveMQ-CPP), to provide the MOM infrastructure
-
> instead of "rolling my own".
> 
> Can anyone please shed light on whether I can use CMS/ActiveMQ-CPP in
a
> *C++
> ONLY* solution?
> 
> Thanks
> --
> View this message in context:
http://www.nabble.com/C%2B%2B-only-solution-
> %28is-this-possible%29--tp18101121p18101121.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.