Currently the activemq-cpp only talks in the stomp protocol, so all data is sent via utf-8 strings, and since the activemq stomp implementation doesn't currently support a MapMessage over stomp. So we really haven't had to worry too much about that. Now if you did want to write some data to an ByteMessage that consisted of primitive types we do provide an EndianReader and EndianWriter that you can wrap around our ByteArrayInputStream's and ByteArrayOutputStream's to write that data in a platform independent way.
If you look through some of the activemq-cpp code you will see that we've created several Java lie classes to make life easier. We hope to expand this as we need to. We have been toying with extracting those Java like classes out of the activemq-cpp code and placing them in a separate library that we affectionately refer to as our Decaf Library. ----------------------------------------- Timothy A. Bish Sensis Corporation ----------------------------------------- > -----Original Message----- > From: Sanjiv Jivan [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 13, 2006 2:32 PM > To: [email protected] > Subject: Re: activemq from C++ application in linux and window > > We've done some profiling and haven't found the marshalling over JNI to be > significant for our requirements, especially with JDK 1.4+. > > btw does ActiveMQ C++ handle network byte ordering when client / server > are > on machines with different byte ordering? > > Thanks, > Sanjiv > > > On 7/13/06, Timothy Bish <[EMAIL PROTECTED]> wrote: > > > > Sanjiv > > > > You design does sound interesting. Its been awhile since I've done any > > JNI > > coding. As with anything there are tradeoffs that you make when you go > > that > > route, as I recall marshalling between contexts can be a big hit to > > overall > > app performance, but at the end of the day, if it meets your > requirements > > then you can't complain to much. > > > > As far as the cross platform threading issues go, we have created a > fairly > > nice Threading implementation in the new activemq-cpp that resembles > java > > threading in its use, and has been tested pretty heavily on Windows and > > Linux, we still need to hit OSX and Solaris. > > > > ------------------------------------------------- > > Timothy A. Bish > > > > > > -----Original Message----- > > From: Sanjiv Jivan [mailto:[EMAIL PROTECTED] > > Sent: Thursday, July 13, 2006 7:29 AM > > To: [email protected] > > Subject: Re: activemq from C++ application in linux and window > > Importance: High > > > > In our project, we embedded a JVM in the C++ app, and exposed methods > for > > inbound -> C++ delegation and C++ --> JNI method to send messages using > > the > > JNI RegisterNatives function. This helps us do all our jms configuration > > using Spring and also keeps the messaging code in Java. The ActiveMQ > > java-java communication seemed more mature than the C++ portion and it > > also > > kept us away from cross platform threading issues associated with C++ > > apps. > > > > Any comments on this approach? > > > > Sanjiv > > > > On 7/13/06, Nathan Mittler <[EMAIL PROTECTED]> wrote: > > > > > > Hi Vishu, > > > comments inline ... > > > > > > On 7/13/06, Vishu <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi Nate, > > > > Thanks a lot for your response. > > > > Sorry for bug you again asking stupid questions > > > > My requirement is something like. There are two applications one > main > > > > application (App1) written in C++ and second application (app2) > > written > > > in > > > > Java. Where App1 will be publishing messages regularly (the no may > be > > > 1000 > > > > message per second or more) these messages need to go to Activemq > and > > > App2 > > > > should be able to subscribe for those message. > > > > > > > > > I see no problems with the data load, in our testing we were sending > > > several > > > thousand messages all at once. > > > > > > > > > I need a persistence > > > > messaging no message should be lost. Because App1 and App2 are > running > > > on > > > > different m/c?s and may not be running at the same time. > > > > > > But looking at > > > > http://www.activemq.org/site/activemq-cpp-roadmap.html > > > > There is known issue > > > > After committing a transaction, the consumer seems to stop getting > > > > messages > > > > after around 999/1000 messages. We think this is a bug at the > broker, > > > but > > > > more investigation is needed. > > > > > > > > > It may be worth noting that this test was done from C++ client to C++ > > > client > > > which may have different results than going from Java->C++. So it may > > be > > > worth your time giving it a shot as you should be able to set up a > test > > > fairly quickly. > > > > > > Also I don't know whether they have had any release of ActiveMq C++ > > > client, > > > > I did not find that on web or is it yet to be released it is still > > under > > > > development. > > > > > > > > > There is no official release yet, as we're still doing some cleanup > > before > > > we begin to port the openwire C++ client. I'm guessing that once we > get > > > openwire in, we'll begin to be incorporated in the mainline release > > cycle > > > with the rest of AMQ. > > > > > > -- > > > > View this message in context: > > > > > > > > > > > http://www.nabble.com/activemq-from-C%2B%2B-application-in-linux-and- > window- > > tf1932905.html#a5302652 > > > > Sent from the ActiveMQ - User forum at Nabble.com. > > > > > > > > > Regards, > > > Nate > > > > > > > > > >
