You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ararog <ro...@gmail.com> on 2010/06/14 20:10:30 UTC

activemq-cpp and solutions written in C

Hi!

Since there's no activity in C version of openwire client library, I would
like to know if there's any chance to make activemq-cpp library be callable
from C code.
-- 
View this message in context: http://old.nabble.com/activemq-cpp-and-solutions-written-in-C-tp28882842p28882842.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: activemq-cpp and solutions written in C

Posted by Timothy Bish <ta...@gmail.com>.
On Tue, 2010-06-15 at 15:27 -0700, ararog wrote:
> After read cms code I could get a better idea about how to marshal/unmarshal
> primitives, but there's a lot of abstraction there that doesn't help me to
> understand how to perform some actions on server (connect, subscribe,
> publish, consume...)

So I take it you are writing a C library from scratch?

The first thing to look at is the WireFormatNegotiator class in
ActiveMQ-CPP, then at ActiveMQConnection, follow the path of the
WireFormat command, and the ConnectionInfo command, that will get you
started on connecting to the Broker.

Regards


-- 
Tim Bish

Open Source Integration: http://fusesource.com
ActiveMQ in Action: http://www.manning.com/snyder/

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/


Re: activemq-cpp and solutions written in C

Posted by ararog <ro...@gmail.com>.
After read cms code I could get a better idea about how to marshal/unmarshal
primitives, but there's a lot of abstraction there that doesn't help me to
understand how to perform some actions on server (connect, subscribe,
publish, consume...)

-----
Regards,

Rogério Pereira Araújo
http://faces.eti.br | http://twitter.com/ararog
-- 
View this message in context: http://old.nabble.com/activemq-cpp-and-solutions-written-in-C-tp28882842p28897094.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: activemq-cpp and solutions written in C

Posted by ararog <ro...@gmail.com>.
Good to know because right now I'm trying to write the most simple scenario,
a simple connection that just send one of the commands, the spec page gives
some good info about how to marshal data and the commands format, but that's
all, no information about what I must pass with each command types to see
something happening on activemq side.


Timothy Bish wrote:
> 
> On Mon, 2010-06-14 at 11:30 -0700, ararog wrote:
>> I strongly considering to write the C version by getting some inspiration
>> on
>> CPP version, what you think?
>> 
>> Not sure if I should write it from scratch by reading the spec or get
>> some
>> help by reading activemq-cpp code.
> 
> Well you could start from scratch and try to write a very small tight C
> library, but it depends on the feature set you eventually want have in
> the C client.  
> 
> ActiveMQ-CPP has come a long way over the years and has or will have
> support for things like failover and SSL connectivity along with a large
> array of unit tests and integration tests, so you'd be starting all over
> if you went the route of writing a pure C client.  It seems like it
> shouldn't be to hard to write a wrapper library in C to expose the
> features of the CMS API to C clients in a user friendly way, I even
> created a module in the ActiveMQ-CPP svn base called ActiveMQ-C to do
> just that but I just haven't had the time to work on it.  If you wanted
> to take a crack at it I'd be glad to test builds and commit patches to
> svn along those lines.  
> 
> Reusing what already exists in the C++ client seems like the smart thing
> to me but I can see the argument for starting from scratch on a C client
> for the C purists out there.  Either way I'd be glad to help out when I
> can and answer questions if you need help.  
> 
> Regards
> 
> -- 
> Tim Bish
> 
> Open Source Integration: http://fusesource.com
> ActiveMQ in Action: http://www.manning.com/snyder/
> 
> Follow me on Twitter: http://twitter.com/tabish121
> My Blog: http://timbish.blogspot.com/
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/activemq-cpp-and-solutions-written-in-C-tp28882842p28896909.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: activemq-cpp and solutions written in C

Posted by Timothy Bish <ta...@gmail.com>.
On Mon, 2010-06-14 at 11:30 -0700, ararog wrote:
> I strongly considering to write the C version by getting some inspiration on
> CPP version, what you think?
> 
> Not sure if I should write it from scratch by reading the spec or get some
> help by reading activemq-cpp code.

Well you could start from scratch and try to write a very small tight C
library, but it depends on the feature set you eventually want have in
the C client.  

ActiveMQ-CPP has come a long way over the years and has or will have
support for things like failover and SSL connectivity along with a large
array of unit tests and integration tests, so you'd be starting all over
if you went the route of writing a pure C client.  It seems like it
shouldn't be to hard to write a wrapper library in C to expose the
features of the CMS API to C clients in a user friendly way, I even
created a module in the ActiveMQ-CPP svn base called ActiveMQ-C to do
just that but I just haven't had the time to work on it.  If you wanted
to take a crack at it I'd be glad to test builds and commit patches to
svn along those lines.  

Reusing what already exists in the C++ client seems like the smart thing
to me but I can see the argument for starting from scratch on a C client
for the C purists out there.  Either way I'd be glad to help out when I
can and answer questions if you need help.  

Regards

-- 
Tim Bish

Open Source Integration: http://fusesource.com
ActiveMQ in Action: http://www.manning.com/snyder/

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/


Re: activemq-cpp and solutions written in C

Posted by ararog <ro...@gmail.com>.
I strongly considering to write the C version by getting some inspiration on
CPP version, what you think?

Not sure if I should write it from scratch by reading the spec or get some
help by reading activemq-cpp code.


Timothy Bish wrote:
> 
> On Mon, 2010-06-14 at 11:10 -0700, ararog wrote:
>> Hi!
>> 
>> Since there's no activity in C version of openwire client library, I
>> would
>> like to know if there's any chance to make activemq-cpp library be
>> callable
>> from C code.
> 
> We welcome your contributions, I don't have any plan to work on that but
> you are welcome to contribute.  You could also pickup work on the
> OpenWire-C client, I've looked at the code and it looks to be pretty far
> along and could be made to work if someone took the time to take it on.
> 
> Regards
> 
> -- 
> Tim Bish
> 
> Open Source Integration: http://fusesource.com
> ActiveMQ in Action: http://www.manning.com/snyder/
> 
> Follow me on Twitter: http://twitter.com/tabish121
> My Blog: http://timbish.blogspot.com/
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/activemq-cpp-and-solutions-written-in-C-tp28882842p28883074.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: activemq-cpp and solutions written in C

Posted by Timothy Bish <ta...@gmail.com>.
On Mon, 2010-06-14 at 11:10 -0700, ararog wrote:
> Hi!
> 
> Since there's no activity in C version of openwire client library, I would
> like to know if there's any chance to make activemq-cpp library be callable
> from C code.

We welcome your contributions, I don't have any plan to work on that but
you are welcome to contribute.  You could also pickup work on the
OpenWire-C client, I've looked at the code and it looks to be pretty far
along and could be made to work if someone took the time to take it on.

Regards

-- 
Tim Bish

Open Source Integration: http://fusesource.com
ActiveMQ in Action: http://www.manning.com/snyder/

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/