You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Dinesh Premalal <xy...@gmail.com> on 2007/08/10 16:03:17 UTC

Using ActiveMQ with "C" System

Hi all,
        I have a system written in C, I want to publish my messages to
ActiveMQ server.  What is the most recommended way?
BTW, I have tried almost all the C options given in the activemq site, but
none of them work for me. (Yes, I know I'm not a very good Java person :( ,
there may be my faults)
       Guys please help me to get this up and running. Thanks in Advance.

thanks,
Dinesh
-- 
http://xydinesh.wordpress.com/
GPG Key ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

Re: Using ActiveMQ with "C" System

Posted by Ron Koerner <ro...@wincor-nixdorf.com>.
Hi Dinesh,

the client just needs APR installed.
main.c is just an example, stomp.[ch] are the "library"

You can compile it with
gcc -pthread -D_GNU_SOURCE -o example -I /usr/local/apr/include/apr-1/
main.c stomp.c /usr/local/apr/lib/libapr-1.a

It works but unfortunately it suffers problems since ActiveMQ tends to hang
when communicating with STOMP clients. It may not be an issue if you don't
do frequent connects and disconnects.

Therefore I'm thinking of enhancing the OpenWire-C client (to a point where
it works), since I need a small interface and activemq-cpp is 1.5MB if
stripped and -O3'ed.

Regards,
Ron

-- 
View this message in context: http://www.nabble.com/Using-ActiveMQ-with-%22C%22-System-tf4248880s2354.html#a12159086
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Using ActiveMQ with "C" System

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi Oleg,


Sure, Ill prepare a little write up and will let the list know.
>

Here [1] the write up that I promised. I wrote another STOMP client that can
be used with Axis2/C. (without using apr) will update about it later.

thanks,
Dinesh

1. http://xydinesh.wordpress.com/2007/08/14/stomp-client-compiled-on-linux/


-- 
http://xydinesh.wordpress.com/
GPG Key ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

Re: Using ActiveMQ with "C" System

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi Oleg,
On 8/12/07, Oleg Deribas <th...@td.selfip.net> wrote:
>
>
>
> Could you please describe how do you do it? Here or somewhere in your
> blog - just for future reference... ;-)


Sure, Ill prepare a little write up and will let the list know.

thanks,
Dinesh



-- 
http://xydinesh.wordpress.com/
GPG Key ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

Re: Using ActiveMQ with "C" System

Posted by Oleg Deribas <th...@td.selfip.net>.
Hello,

Dinesh Premalal said the following on 11.08.2007 22:21:

>>> Did you tried to use stomp C client?
>>>
>>> http://stomp.codehaus.org/C

> I was able to get it up running on Linux :) , many thanks for the pointer.

Could you please describe how do you do it? Here or somewhere in your 
blog - just for future reference... ;-)

-- 
Oleg


Re: Using ActiveMQ with "C" System

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi Oleg,

On 8/10/07, Dinesh Premalal <xy...@gmail.com> wrote:
>
> Hi ,
>
> On 8/10/07, Oleg Deribas <th...@td.selfip.net> wrote:
> >
> >
> >
> > Did you tried to use stomp C client?
> >
> > http://stomp.codehaus.org/C
>
>
> Yes I looked on to it . But it's building page [1] says , it required Mac
> and X Code 2 installed.  Does any body using this ?  BTW Is this (libstomp)
> code, is stable enough to put in production  environment ?. ( I doubt this
> because it isn't released yet).
>

I was able to get it up running on Linux :) , many thanks for the pointer.

thanks,
Dinesh




-- 
http://xydinesh.wordpress.com/
GPG Key ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

Re: Using ActiveMQ with "C" System

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi ,

On 8/10/07, Oleg Deribas <th...@td.selfip.net> wrote:
>
>
>
> Did you tried to use stomp C client?
>
> http://stomp.codehaus.org/C


Yes I looked on to it . But it's building page [1] says , it required Mac
and X Code 2 installed.  Does any body using this ?  BTW Is this (libstomp)
code, is stable enough to put in production  environment ?. ( I doubt this
because it isn't released yet).

thanks,
Dinesh

1.http://stomp.codehaus.org/Building+libstomp


--
> Oleg
>
>


-- 
http://xydinesh.wordpress.com/
GPG Key ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

Re: Using ActiveMQ with "C" System

Posted by Oleg Deribas <th...@td.selfip.net>.
Hello,

Dinesh Premalal said the following on 10.08.2007 17:03:

>         I have a system written in C, I want to publish my messages to
> ActiveMQ server.  What is the most recommended way?
> BTW, I have tried almost all the C options given in the activemq site, but
> none of them work for me. 

Did you tried to use stomp C client?

http://stomp.codehaus.org/C

-- 
Oleg


Re: Using ActiveMQ with "C" System

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi Tim,
           Many thanks for your response. Please find my comments inline

On 8/10/07, Timothy Bish <ti...@sensis.com> wrote:
>
> Depending on your platform and compiler requirements, you could use
> ActiveMQ-CPP.  It should be to hard to write a C wrapper around the C++
> libraries API so that you can use it from you existing code base.


I would love if I could use a C client or the other communication options
(REST , XMPP) over the writing wrapper library to ActiveMQ-CPP.

Yesterday, I tried XMPP but ActiveMQ allow me to connect with Spark (XMPP
client only) :( other client doesn't understand what ActiveMQ says.

Today , I tried  REST api but it also gave me a problem. I posted it in my
other mail.

 At the moment, I think remain option is writing a wrapper for ActiveMQ C++.
But I'm quite reluctant to give up on XMPP and REST options :(

thanks,
Dinesh




-- 
http://xydinesh.wordpress.com/
GPG Key ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

Re: Using ActiveMQ with "C" System

Posted by Timothy Bish <ti...@sensis.com>.
Depending on your platform and compiler requirements, you could use
ActiveMQ-CPP.  It should be to hard to write a C wrapper around the C++
libraries API so that you can use it from you existing code base.  

Not sure what the state of the other C clients are at the moment.

Regards
Tim.

On Fri, 2007-08-10 at 19:33 +0530, Dinesh Premalal wrote:
> Hi all,
>         I have a system written in C, I want to publish my messages to
> ActiveMQ server.  What is the most recommended way?
> BTW, I have tried almost all the C options given in the activemq site, but
> none of them work for me. (Yes, I know I'm not a very good Java person :( ,
> there may be my faults)
>        Guys please help me to get this up and running. Thanks in Advance.
> 
> thanks,
> Dinesh