You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Hightower, Rick" <Ri...@corventis.com> on 2010/01/29 00:11:25 UTC

C support for ActiveMQ... care to share a make file?

I need to do some messaging between C, Python and Java. I have used
ActiveMQ in the past, and feel comfortable with it.

 

This is an R&D, proof of concept type project for the next version of
our product. We have a variety of ways to do messaging between Java,
Python and C processes. We would like to standardize on one way as we
need to increase the amount of communication. I am trying to get some
proof of concepts done to test out ActiveMQ (my first choice), versus
Apache QPID (second choice) or something else.

I downloaded the example for the stomp.py and got the Python example
working no problem.

Now... I am trying to get the Stomp C bits working. There is no make
file! DOH! Ok ok... I don't mind creating one (I just need to figure out
which libs this needs). I am building and using on Linux (Debian to be
specific.) (Stomp is a text based protocol for messaging that ActiveMQ
and JBoss MQ support.)

Since the Stomp C lib is not there, I figured I would just try out
Apache QPID. But wait... Apache QPID does not have C client lib. They
only have a C++ client. Hmmm scratch that. So I figured why not give
RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
seem much better than Stomp C's support. (Apache QPID implements AMQP.) 

Ok this made me focus back to ActiveMQ and take a look at their C
support for OpenWire. No make file. There is a X Code project file.
Since I need to run this on Debian... this does not help me much. Again
I would need to create my own make file (and figure out which libs this
lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
native wire format which is also a standard, except of course that they
are the only one's that implement it). 

I've come to the conclusion that the C support for MOM is not really
there. Since C is very popular, I wonder why this is not a more well
worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
whatever... this path is all full of tall grass... seems really easy to
get bogged down in the weeds.

 

Does anyone have any experience using C OpenWire or C Stomp client libs
with ActiveMQ? If so, do you care to share your make files? I am going
to go to lunch and then if I don't get pulled of this R&D effort to work
on some pressing current release effort... I am going to create a make
file for Stomp C support. 

 

 

 

Rick Hightower

Chief Architect

Corventis Corp

Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4

Blog: http://www.jroller.com/page/RickHigh

Resume: http://www.linkedin.com/in/rickhigh

Twitter: http://twitter.com/RickHigh

Profile: http://java.dzone.com/users/rhightower

JDJ: http://rickhightower.sys-con.com/latest/articles

 


RE: C support for ActiveMQ... care to share a make file?

Posted by "Hightower, Rick" <Ri...@corventis.com>.
Wow... At first, I went to the link before reading your whole email.
Then I cursed you silently as I tried to figure out what blacktie is.
Then I was about to write you a snarky email. Then I saw the magic beans
that lead to the clues. 

Thanks man.



-----Original Message-----
From: Pothier, Peter [mailto:ppothier@CROSSBEAMSYS.COM] 
Sent: Thursday, January 28, 2010 3:16 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Check out step 5

     http://community.jboss.org/wiki/buildingblacktie

on building libstomp.


-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 6:11 PM
To: users@activemq.apache.org
Subject: C support for ActiveMQ... care to share a make file?


I need to do some messaging between C, Python and Java. I have used
ActiveMQ in the past, and feel comfortable with it.

 

This is an R&D, proof of concept type project for the next version of
our product. We have a variety of ways to do messaging between Java,
Python and C processes. We would like to standardize on one way as we
need to increase the amount of communication. I am trying to get some
proof of concepts done to test out ActiveMQ (my first choice), versus
Apache QPID (second choice) or something else.

I downloaded the example for the stomp.py and got the Python example
working no problem.

Now... I am trying to get the Stomp C bits working. There is no make
file! DOH! Ok ok... I don't mind creating one (I just need to figure out
which libs this needs). I am building and using on Linux (Debian to be
specific.) (Stomp is a text based protocol for messaging that ActiveMQ
and JBoss MQ support.)

Since the Stomp C lib is not there, I figured I would just try out
Apache QPID. But wait... Apache QPID does not have C client lib. They
only have a C++ client. Hmmm scratch that. So I figured why not give
RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
seem much better than Stomp C's support. (Apache QPID implements AMQP.) 

Ok this made me focus back to ActiveMQ and take a look at their C
support for OpenWire. No make file. There is a X Code project file.
Since I need to run this on Debian... this does not help me much. Again
I would need to create my own make file (and figure out which libs this
lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
native wire format which is also a standard, except of course that they
are the only one's that implement it). 

I've come to the conclusion that the C support for MOM is not really
there. Since C is very popular, I wonder why this is not a more well
worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
whatever... this path is all full of tall grass... seems really easy to
get bogged down in the weeds.

 

Does anyone have any experience using C OpenWire or C Stomp client libs
with ActiveMQ? If so, do you care to share your make files? I am going
to go to lunch and then if I don't get pulled of this R&D effort to work
on some pressing current release effort... I am going to create a make
file for Stomp C support. 

 

 

 

Rick Hightower

Chief Architect

Corventis Corp

Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4

Blog: http://www.jroller.com/page/RickHigh

Resume: http://www.linkedin.com/in/rickhigh

Twitter: http://twitter.com/RickHigh

Profile: http://java.dzone.com/users/rhightower

JDJ: http://rickhightower.sys-con.com/latest/articles

 


RE: C support for ActiveMQ... care to share a make file?

Posted by "Hightower, Rick" <Ri...@corventis.com>.
I've been googling around and from the mailing lists. It seems that the
problem is with Apache HTTPD libs it depends on.

Probably just need to recompile Apache, recompile my linux kernel, jump
in ice water, sacrifice a few chickens, march around my cube backwards
while playing a silver tuba and it will work.

Seriously, I have things working on this box with Apache and I don't
want to mess with Apache HTTPD. I will create another VM instance and
try compiling Apache from source.



-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 6:23 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Thanks.. .I tried that and a few other things related to that.. I still
get the same compile errors...

#!/bin/bash
OUT_DIR=target/debug/shared
gcc -fPIC src/main.c -omain -l$OUT_DIR/libstomp.so -I. -I./src
-I/usr/include/apr-1.0 -lapr-1 `/usr/bin/apr-1-config  --cflags
--includes --ldflags`




-----Original Message-----
From: Pothier, Peter [mailto:ppothier@CROSSBEAMSYS.COM] 
Sent: Thursday, January 28, 2010 4:42 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?


run "/usr/bin/apr-1-config --cppflags --cflags"
and put these flags into the build script
     

-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 7:14 PM
To: Hightower, Rick; users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Ok so the library built fine. Whoo hoo!

Following the instructions from here (which are based on the JBoss
instructions but adapted to Debian).

http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html

Then I tried to build the example main.c. The main.c is an example
program that sends and then receives a message.

I am getting no love.

It seems it is getting compile errors from headers that it is including
from stomp.h.

I adapted their build.sh to build just the main.c file as follows:

#!/bin/bash
gcc -fPIC src/main.c -omain -l./ target/debug/shared/libstomp.so -I.
-I./src -I/usr/include/apr-1.0 -lapr-1


Then I get these error messages....

rick@debian:~/tools/libstomp$ ./buildmain.sh
In file included from /usr/include/apr-1.0/apr_general.h:28,
                 from src/stomp.h:20,
                 from src/main.c:19:
/usr/include/apr-1.0/apr.h:273: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'apr_off_t'
In file included from /usr/include/apr-1.0/apr_file_io.h:29,
                 from /usr/include/apr-1.0/apr_network_io.h:26,
                 from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_file_info.h:206: error: expected
specifier-qualifier-list before 'apr_off_t'
In file included from /usr/include/apr-1.0/apr_network_io.h:26,
                 from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_file_io.h:551: error: expected declaration
specifiers or '...' before 'apr_off_t'
/usr/include/apr-1.0/apr_file_io.h:749: error: expected declaration
specifiers or '...' before 'apr_off_t'
In file included from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_network_io.h:549: error: expected declaration
specifiers or '...' before 'apr_off_t'

-----Original Message-----
From: Hightower, Rick 
Sent: Thursday, January 28, 2010 3:29 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

BTW This is a good link too
http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html as it only covers libstomp (also on Debian which I am using).


-----Original Message-----
From: Pothier, Peter [mailto:ppothier@CROSSBEAMSYS.COM] 
Sent: Thursday, January 28, 2010 3:16 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Check out step 5

     http://community.jboss.org/wiki/buildingblacktie

on building libstomp.


-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 6:11 PM
To: users@activemq.apache.org
Subject: C support for ActiveMQ... care to share a make file?


I need to do some messaging between C, Python and Java. I have used
ActiveMQ in the past, and feel comfortable with it.

 

This is an R&D, proof of concept type project for the next version of
our product. We have a variety of ways to do messaging between Java,
Python and C processes. We would like to standardize on one way as we
need to increase the amount of communication. I am trying to get some
proof of concepts done to test out ActiveMQ (my first choice), versus
Apache QPID (second choice) or something else.

I downloaded the example for the stomp.py and got the Python example
working no problem.

Now... I am trying to get the Stomp C bits working. There is no make
file! DOH! Ok ok... I don't mind creating one (I just need to figure out
which libs this needs). I am building and using on Linux (Debian to be
specific.) (Stomp is a text based protocol for messaging that ActiveMQ
and JBoss MQ support.)

Since the Stomp C lib is not there, I figured I would just try out
Apache QPID. But wait... Apache QPID does not have C client lib. They
only have a C++ client. Hmmm scratch that. So I figured why not give
RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
seem much better than Stomp C's support. (Apache QPID implements AMQP.) 

Ok this made me focus back to ActiveMQ and take a look at their C
support for OpenWire. No make file. There is a X Code project file.
Since I need to run this on Debian... this does not help me much. Again
I would need to create my own make file (and figure out which libs this
lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
native wire format which is also a standard, except of course that they
are the only one's that implement it). 

I've come to the conclusion that the C support for MOM is not really
there. Since C is very popular, I wonder why this is not a more well
worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
whatever... this path is all full of tall grass... seems really easy to
get bogged down in the weeds.

 

Does anyone have any experience using C OpenWire or C Stomp client libs
with ActiveMQ? If so, do you care to share your make files? I am going
to go to lunch and then if I don't get pulled of this R&D effort to work
on some pressing current release effort... I am going to create a make
file for Stomp C support. 

 

 

 

Rick Hightower

Chief Architect

Corventis Corp

Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4

Blog: http://www.jroller.com/page/RickHigh

Resume: http://www.linkedin.com/in/rickhigh

Twitter: http://twitter.com/RickHigh

Profile: http://java.dzone.com/users/rhightower

JDJ: http://rickhightower.sys-con.com/latest/articles

 


RE: C support for ActiveMQ... care to share a make file?

Posted by "Hightower, Rick" <Ri...@corventis.com>.
Thanks.. .I tried that and a few other things related to that.. I still
get the same compile errors...

#!/bin/bash
OUT_DIR=target/debug/shared
gcc -fPIC src/main.c -omain -l$OUT_DIR/libstomp.so -I. -I./src
-I/usr/include/apr-1.0 -lapr-1 `/usr/bin/apr-1-config  --cflags
--includes --ldflags`




-----Original Message-----
From: Pothier, Peter [mailto:ppothier@CROSSBEAMSYS.COM] 
Sent: Thursday, January 28, 2010 4:42 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?


run "/usr/bin/apr-1-config --cppflags --cflags"
and put these flags into the build script
     

-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 7:14 PM
To: Hightower, Rick; users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Ok so the library built fine. Whoo hoo!

Following the instructions from here (which are based on the JBoss
instructions but adapted to Debian).

http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html

Then I tried to build the example main.c. The main.c is an example
program that sends and then receives a message.

I am getting no love.

It seems it is getting compile errors from headers that it is including
from stomp.h.

I adapted their build.sh to build just the main.c file as follows:

#!/bin/bash
gcc -fPIC src/main.c -omain -l./ target/debug/shared/libstomp.so -I.
-I./src -I/usr/include/apr-1.0 -lapr-1


Then I get these error messages....

rick@debian:~/tools/libstomp$ ./buildmain.sh
In file included from /usr/include/apr-1.0/apr_general.h:28,
                 from src/stomp.h:20,
                 from src/main.c:19:
/usr/include/apr-1.0/apr.h:273: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'apr_off_t'
In file included from /usr/include/apr-1.0/apr_file_io.h:29,
                 from /usr/include/apr-1.0/apr_network_io.h:26,
                 from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_file_info.h:206: error: expected
specifier-qualifier-list before 'apr_off_t'
In file included from /usr/include/apr-1.0/apr_network_io.h:26,
                 from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_file_io.h:551: error: expected declaration
specifiers or '...' before 'apr_off_t'
/usr/include/apr-1.0/apr_file_io.h:749: error: expected declaration
specifiers or '...' before 'apr_off_t'
In file included from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_network_io.h:549: error: expected declaration
specifiers or '...' before 'apr_off_t'

-----Original Message-----
From: Hightower, Rick 
Sent: Thursday, January 28, 2010 3:29 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

BTW This is a good link too
http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html as it only covers libstomp (also on Debian which I am using).


-----Original Message-----
From: Pothier, Peter [mailto:ppothier@CROSSBEAMSYS.COM] 
Sent: Thursday, January 28, 2010 3:16 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Check out step 5

     http://community.jboss.org/wiki/buildingblacktie

on building libstomp.


-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 6:11 PM
To: users@activemq.apache.org
Subject: C support for ActiveMQ... care to share a make file?


I need to do some messaging between C, Python and Java. I have used
ActiveMQ in the past, and feel comfortable with it.

 

This is an R&D, proof of concept type project for the next version of
our product. We have a variety of ways to do messaging between Java,
Python and C processes. We would like to standardize on one way as we
need to increase the amount of communication. I am trying to get some
proof of concepts done to test out ActiveMQ (my first choice), versus
Apache QPID (second choice) or something else.

I downloaded the example for the stomp.py and got the Python example
working no problem.

Now... I am trying to get the Stomp C bits working. There is no make
file! DOH! Ok ok... I don't mind creating one (I just need to figure out
which libs this needs). I am building and using on Linux (Debian to be
specific.) (Stomp is a text based protocol for messaging that ActiveMQ
and JBoss MQ support.)

Since the Stomp C lib is not there, I figured I would just try out
Apache QPID. But wait... Apache QPID does not have C client lib. They
only have a C++ client. Hmmm scratch that. So I figured why not give
RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
seem much better than Stomp C's support. (Apache QPID implements AMQP.) 

Ok this made me focus back to ActiveMQ and take a look at their C
support for OpenWire. No make file. There is a X Code project file.
Since I need to run this on Debian... this does not help me much. Again
I would need to create my own make file (and figure out which libs this
lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
native wire format which is also a standard, except of course that they
are the only one's that implement it). 

I've come to the conclusion that the C support for MOM is not really
there. Since C is very popular, I wonder why this is not a more well
worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
whatever... this path is all full of tall grass... seems really easy to
get bogged down in the weeds.

 

Does anyone have any experience using C OpenWire or C Stomp client libs
with ActiveMQ? If so, do you care to share your make files? I am going
to go to lunch and then if I don't get pulled of this R&D effort to work
on some pressing current release effort... I am going to create a make
file for Stomp C support. 

 

 

 

Rick Hightower

Chief Architect

Corventis Corp

Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4

Blog: http://www.jroller.com/page/RickHigh

Resume: http://www.linkedin.com/in/rickhigh

Twitter: http://twitter.com/RickHigh

Profile: http://java.dzone.com/users/rhightower

JDJ: http://rickhightower.sys-con.com/latest/articles

 


RE: C support for ActiveMQ... care to share a make file?

Posted by "Pothier, Peter" <pp...@CROSSBEAMSYS.COM>.
run "/usr/bin/apr-1-config --cppflags --cflags"
and put these flags into the build script
     

-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 7:14 PM
To: Hightower, Rick; users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Ok so the library built fine. Whoo hoo!

Following the instructions from here (which are based on the JBoss
instructions but adapted to Debian).

http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html

Then I tried to build the example main.c. The main.c is an example
program that sends and then receives a message.

I am getting no love.

It seems it is getting compile errors from headers that it is including
from stomp.h.

I adapted their build.sh to build just the main.c file as follows:

#!/bin/bash
gcc -fPIC src/main.c -omain -l./ target/debug/shared/libstomp.so -I.
-I./src -I/usr/include/apr-1.0 -lapr-1


Then I get these error messages....

rick@debian:~/tools/libstomp$ ./buildmain.sh
In file included from /usr/include/apr-1.0/apr_general.h:28,
                 from src/stomp.h:20,
                 from src/main.c:19:
/usr/include/apr-1.0/apr.h:273: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'apr_off_t'
In file included from /usr/include/apr-1.0/apr_file_io.h:29,
                 from /usr/include/apr-1.0/apr_network_io.h:26,
                 from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_file_info.h:206: error: expected
specifier-qualifier-list before 'apr_off_t'
In file included from /usr/include/apr-1.0/apr_network_io.h:26,
                 from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_file_io.h:551: error: expected declaration
specifiers or '...' before 'apr_off_t'
/usr/include/apr-1.0/apr_file_io.h:749: error: expected declaration
specifiers or '...' before 'apr_off_t'
In file included from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_network_io.h:549: error: expected declaration
specifiers or '...' before 'apr_off_t'

-----Original Message-----
From: Hightower, Rick 
Sent: Thursday, January 28, 2010 3:29 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

BTW This is a good link too
http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html as it only covers libstomp (also on Debian which I am using).


-----Original Message-----
From: Pothier, Peter [mailto:ppothier@CROSSBEAMSYS.COM] 
Sent: Thursday, January 28, 2010 3:16 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Check out step 5

     http://community.jboss.org/wiki/buildingblacktie

on building libstomp.


-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 6:11 PM
To: users@activemq.apache.org
Subject: C support for ActiveMQ... care to share a make file?


I need to do some messaging between C, Python and Java. I have used
ActiveMQ in the past, and feel comfortable with it.

 

This is an R&D, proof of concept type project for the next version of
our product. We have a variety of ways to do messaging between Java,
Python and C processes. We would like to standardize on one way as we
need to increase the amount of communication. I am trying to get some
proof of concepts done to test out ActiveMQ (my first choice), versus
Apache QPID (second choice) or something else.

I downloaded the example for the stomp.py and got the Python example
working no problem.

Now... I am trying to get the Stomp C bits working. There is no make
file! DOH! Ok ok... I don't mind creating one (I just need to figure out
which libs this needs). I am building and using on Linux (Debian to be
specific.) (Stomp is a text based protocol for messaging that ActiveMQ
and JBoss MQ support.)

Since the Stomp C lib is not there, I figured I would just try out
Apache QPID. But wait... Apache QPID does not have C client lib. They
only have a C++ client. Hmmm scratch that. So I figured why not give
RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
seem much better than Stomp C's support. (Apache QPID implements AMQP.) 

Ok this made me focus back to ActiveMQ and take a look at their C
support for OpenWire. No make file. There is a X Code project file.
Since I need to run this on Debian... this does not help me much. Again
I would need to create my own make file (and figure out which libs this
lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
native wire format which is also a standard, except of course that they
are the only one's that implement it). 

I've come to the conclusion that the C support for MOM is not really
there. Since C is very popular, I wonder why this is not a more well
worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
whatever... this path is all full of tall grass... seems really easy to
get bogged down in the weeds.

 

Does anyone have any experience using C OpenWire or C Stomp client libs
with ActiveMQ? If so, do you care to share your make files? I am going
to go to lunch and then if I don't get pulled of this R&D effort to work
on some pressing current release effort... I am going to create a make
file for Stomp C support. 

 

 

 

Rick Hightower

Chief Architect

Corventis Corp

Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4

Blog: http://www.jroller.com/page/RickHigh

Resume: http://www.linkedin.com/in/rickhigh

Twitter: http://twitter.com/RickHigh

Profile: http://java.dzone.com/users/rhightower

JDJ: http://rickhightower.sys-con.com/latest/articles

 


RE: C support for ActiveMQ... care to share a make file?

Posted by "Hightower, Rick" <Ri...@corventis.com>.
Ok so the library built fine. Whoo hoo!

Following the instructions from here (which are based on the JBoss
instructions but adapted to Debian).

http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html

Then I tried to build the example main.c. The main.c is an example
program that sends and then receives a message.

I am getting no love.

It seems it is getting compile errors from headers that it is including
from stomp.h.

I adapted their build.sh to build just the main.c file as follows:

#!/bin/bash
gcc -fPIC src/main.c -omain -l./ target/debug/shared/libstomp.so -I.
-I./src -I/usr/include/apr-1.0 -lapr-1


Then I get these error messages....

rick@debian:~/tools/libstomp$ ./buildmain.sh
In file included from /usr/include/apr-1.0/apr_general.h:28,
                 from src/stomp.h:20,
                 from src/main.c:19:
/usr/include/apr-1.0/apr.h:273: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'apr_off_t'
In file included from /usr/include/apr-1.0/apr_file_io.h:29,
                 from /usr/include/apr-1.0/apr_network_io.h:26,
                 from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_file_info.h:206: error: expected
specifier-qualifier-list before 'apr_off_t'
In file included from /usr/include/apr-1.0/apr_network_io.h:26,
                 from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_file_io.h:551: error: expected declaration
specifiers or '...' before 'apr_off_t'
/usr/include/apr-1.0/apr_file_io.h:749: error: expected declaration
specifiers or '...' before 'apr_off_t'
In file included from src/stomp.h:21,
                 from src/main.c:19:
/usr/include/apr-1.0/apr_network_io.h:549: error: expected declaration
specifiers or '...' before 'apr_off_t'

-----Original Message-----
From: Hightower, Rick 
Sent: Thursday, January 28, 2010 3:29 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

BTW This is a good link too
http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html as it only covers libstomp (also on Debian which I am using).


-----Original Message-----
From: Pothier, Peter [mailto:ppothier@CROSSBEAMSYS.COM] 
Sent: Thursday, January 28, 2010 3:16 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Check out step 5

     http://community.jboss.org/wiki/buildingblacktie

on building libstomp.


-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 6:11 PM
To: users@activemq.apache.org
Subject: C support for ActiveMQ... care to share a make file?


I need to do some messaging between C, Python and Java. I have used
ActiveMQ in the past, and feel comfortable with it.

 

This is an R&D, proof of concept type project for the next version of
our product. We have a variety of ways to do messaging between Java,
Python and C processes. We would like to standardize on one way as we
need to increase the amount of communication. I am trying to get some
proof of concepts done to test out ActiveMQ (my first choice), versus
Apache QPID (second choice) or something else.

I downloaded the example for the stomp.py and got the Python example
working no problem.

Now... I am trying to get the Stomp C bits working. There is no make
file! DOH! Ok ok... I don't mind creating one (I just need to figure out
which libs this needs). I am building and using on Linux (Debian to be
specific.) (Stomp is a text based protocol for messaging that ActiveMQ
and JBoss MQ support.)

Since the Stomp C lib is not there, I figured I would just try out
Apache QPID. But wait... Apache QPID does not have C client lib. They
only have a C++ client. Hmmm scratch that. So I figured why not give
RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
seem much better than Stomp C's support. (Apache QPID implements AMQP.) 

Ok this made me focus back to ActiveMQ and take a look at their C
support for OpenWire. No make file. There is a X Code project file.
Since I need to run this on Debian... this does not help me much. Again
I would need to create my own make file (and figure out which libs this
lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
native wire format which is also a standard, except of course that they
are the only one's that implement it). 

I've come to the conclusion that the C support for MOM is not really
there. Since C is very popular, I wonder why this is not a more well
worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
whatever... this path is all full of tall grass... seems really easy to
get bogged down in the weeds.

 

Does anyone have any experience using C OpenWire or C Stomp client libs
with ActiveMQ? If so, do you care to share your make files? I am going
to go to lunch and then if I don't get pulled of this R&D effort to work
on some pressing current release effort... I am going to create a make
file for Stomp C support. 

 

 

 

Rick Hightower

Chief Architect

Corventis Corp

Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4

Blog: http://www.jroller.com/page/RickHigh

Resume: http://www.linkedin.com/in/rickhigh

Twitter: http://twitter.com/RickHigh

Profile: http://java.dzone.com/users/rhightower

JDJ: http://rickhightower.sys-con.com/latest/articles

 


RE: C support for ActiveMQ... care to share a make file?

Posted by "Hightower, Rick" <Ri...@corventis.com>.
BTW This is a good link too
http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li
.html as it only covers libstomp (also on Debian which I am using).


-----Original Message-----
From: Pothier, Peter [mailto:ppothier@CROSSBEAMSYS.COM] 
Sent: Thursday, January 28, 2010 3:16 PM
To: users@activemq.apache.org
Subject: RE: C support for ActiveMQ... care to share a make file?

Check out step 5

     http://community.jboss.org/wiki/buildingblacktie

on building libstomp.


-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 6:11 PM
To: users@activemq.apache.org
Subject: C support for ActiveMQ... care to share a make file?


I need to do some messaging between C, Python and Java. I have used
ActiveMQ in the past, and feel comfortable with it.

 

This is an R&D, proof of concept type project for the next version of
our product. We have a variety of ways to do messaging between Java,
Python and C processes. We would like to standardize on one way as we
need to increase the amount of communication. I am trying to get some
proof of concepts done to test out ActiveMQ (my first choice), versus
Apache QPID (second choice) or something else.

I downloaded the example for the stomp.py and got the Python example
working no problem.

Now... I am trying to get the Stomp C bits working. There is no make
file! DOH! Ok ok... I don't mind creating one (I just need to figure out
which libs this needs). I am building and using on Linux (Debian to be
specific.) (Stomp is a text based protocol for messaging that ActiveMQ
and JBoss MQ support.)

Since the Stomp C lib is not there, I figured I would just try out
Apache QPID. But wait... Apache QPID does not have C client lib. They
only have a C++ client. Hmmm scratch that. So I figured why not give
RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
seem much better than Stomp C's support. (Apache QPID implements AMQP.) 

Ok this made me focus back to ActiveMQ and take a look at their C
support for OpenWire. No make file. There is a X Code project file.
Since I need to run this on Debian... this does not help me much. Again
I would need to create my own make file (and figure out which libs this
lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
native wire format which is also a standard, except of course that they
are the only one's that implement it). 

I've come to the conclusion that the C support for MOM is not really
there. Since C is very popular, I wonder why this is not a more well
worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
whatever... this path is all full of tall grass... seems really easy to
get bogged down in the weeds.

 

Does anyone have any experience using C OpenWire or C Stomp client libs
with ActiveMQ? If so, do you care to share your make files? I am going
to go to lunch and then if I don't get pulled of this R&D effort to work
on some pressing current release effort... I am going to create a make
file for Stomp C support. 

 

 

 

Rick Hightower

Chief Architect

Corventis Corp

Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4

Blog: http://www.jroller.com/page/RickHigh

Resume: http://www.linkedin.com/in/rickhigh

Twitter: http://twitter.com/RickHigh

Profile: http://java.dzone.com/users/rhightower

JDJ: http://rickhightower.sys-con.com/latest/articles

 


RE: C support for ActiveMQ... care to share a make file?

Posted by "Pothier, Peter" <pp...@CROSSBEAMSYS.COM>.
Check out step 5

     http://community.jboss.org/wiki/buildingblacktie

on building libstomp.


-----Original Message-----
From: Hightower, Rick [mailto:Rick.Hightower@corventis.com] 
Sent: Thursday, January 28, 2010 6:11 PM
To: users@activemq.apache.org
Subject: C support for ActiveMQ... care to share a make file?


I need to do some messaging between C, Python and Java. I have used
ActiveMQ in the past, and feel comfortable with it.

 

This is an R&D, proof of concept type project for the next version of
our product. We have a variety of ways to do messaging between Java,
Python and C processes. We would like to standardize on one way as we
need to increase the amount of communication. I am trying to get some
proof of concepts done to test out ActiveMQ (my first choice), versus
Apache QPID (second choice) or something else.

I downloaded the example for the stomp.py and got the Python example
working no problem.

Now... I am trying to get the Stomp C bits working. There is no make
file! DOH! Ok ok... I don't mind creating one (I just need to figure out
which libs this needs). I am building and using on Linux (Debian to be
specific.) (Stomp is a text based protocol for messaging that ActiveMQ
and JBoss MQ support.)

Since the Stomp C lib is not there, I figured I would just try out
Apache QPID. But wait... Apache QPID does not have C client lib. They
only have a C++ client. Hmmm scratch that. So I figured why not give
RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
seem much better than Stomp C's support. (Apache QPID implements AMQP.) 

Ok this made me focus back to ActiveMQ and take a look at their C
support for OpenWire. No make file. There is a X Code project file.
Since I need to run this on Debian... this does not help me much. Again
I would need to create my own make file (and figure out which libs this
lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
native wire format which is also a standard, except of course that they
are the only one's that implement it). 

I've come to the conclusion that the C support for MOM is not really
there. Since C is very popular, I wonder why this is not a more well
worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
whatever... this path is all full of tall grass... seems really easy to
get bogged down in the weeds.

 

Does anyone have any experience using C OpenWire or C Stomp client libs
with ActiveMQ? If so, do you care to share your make files? I am going
to go to lunch and then if I don't get pulled of this R&D effort to work
on some pressing current release effort... I am going to create a make
file for Stomp C support. 

 

 

 

Rick Hightower

Chief Architect

Corventis Corp

Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4

Blog: http://www.jroller.com/page/RickHigh

Resume: http://www.linkedin.com/in/rickhigh

Twitter: http://twitter.com/RickHigh

Profile: http://java.dzone.com/users/rhightower

JDJ: http://rickhightower.sys-con.com/latest/articles

 


Re: C support for ActiveMQ... care to share a make file?

Posted by Timothy Bish <ta...@gmail.com>.
To make it easier to build and install the libstomp-c library I threw
together an autotools build for it, I attached the tar with the files for
you.  

you should be able to build the lib now with the following commands

./autogen.sh
./configure
make

you can install with the normal 'make install'

Regards
Tim.

-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/



Hightower, Rick wrote:
> 
> 
> I need to do some messaging between C, Python and Java. I have used
> ActiveMQ in the past, and feel comfortable with it.
> 
>  
> 
> This is an R&D, proof of concept type project for the next version of
> our product. We have a variety of ways to do messaging between Java,
> Python and C processes. We would like to standardize on one way as we
> need to increase the amount of communication. I am trying to get some
> proof of concepts done to test out ActiveMQ (my first choice), versus
> Apache QPID (second choice) or something else.
> 
> I downloaded the example for the stomp.py and got the Python example
> working no problem.
> 
> Now... I am trying to get the Stomp C bits working. There is no make
> file! DOH! Ok ok... I don't mind creating one (I just need to figure out
> which libs this needs). I am building and using on Linux (Debian to be
> specific.) (Stomp is a text based protocol for messaging that ActiveMQ
> and JBoss MQ support.)
> 
> Since the Stomp C lib is not there, I figured I would just try out
> Apache QPID. But wait... Apache QPID does not have C client lib. They
> only have a C++ client. Hmmm scratch that. So I figured why not give
> RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not
> seem much better than Stomp C's support. (Apache QPID implements AMQP.) 
> 
> Ok this made me focus back to ActiveMQ and take a look at their C
> support for OpenWire. No make file. There is a X Code project file.
> Since I need to run this on Debian... this does not help me much. Again
> I would need to create my own make file (and figure out which libs this
> lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's
> native wire format which is also a standard, except of course that they
> are the only one's that implement it). 
> 
> I've come to the conclusion that the C support for MOM is not really
> there. Since C is very popular, I wonder why this is not a more well
> worn path. It does not matter if you are using OpenWire, AMQP, Stomp,
> whatever... this path is all full of tall grass... seems really easy to
> get bogged down in the weeds.
> 
>  
> 
> Does anyone have any experience using C OpenWire or C Stomp client libs
> with ActiveMQ? If so, do you care to share your make files? I am going
> to go to lunch and then if I don't get pulled of this R&D effort to work
> on some pressing current release effort... I am going to create a make
> file for Stomp C support. 
> 
>  
> 
>  
> 
>  
> 
> Rick Hightower
> 
> Chief Architect
> 
> Corventis Corp
> 
> Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4
> 
> Blog: http://www.jroller.com/page/RickHigh
> 
> Resume: http://www.linkedin.com/in/rickhigh
> 
> Twitter: http://twitter.com/RickHigh
> 
> Profile: http://java.dzone.com/users/rhightower
> 
> JDJ: http://rickhightower.sys-con.com/latest/articles
> 
>  
> 
> 
> 
http://old.nabble.com/file/p27426018/stomp-c.tar.bz2 stomp-c.tar.bz2 
-- 
View this message in context: http://old.nabble.com/C-support-for-ActiveMQ...-care-to-share-a-make-file--tp27364804p27426018.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.