Hey James, Thanks for the prompt reply. I've already tried Stomp for talking to ActiveMQ, & the performance is quite good. I've even modified the Net::Stomp module available on CPAN to handle transactions & the master/slave topology of ActiveMQ. But we want to explore all possible ways for Perl clients to talk to ActiveMQ, as our choice would have organization wide implications. As far as I can tell, the possible mechanisms are Stomp, HTTP & the REST API. Can you suggest which one will be the most suitable in terms of guaranteed message delivery? Raw performance is not really an issue as we are not looking at message rates beyond a few hundred messages per second. And can you point me to some working Perl code using Http transport & REST?
Thanks, Ramit Arora James.Strachan wrote: > > To talk to ActiveMQ via Perl, use the Perl Stomp client... > > http://activemq.apache.org/cross-language-clients.html > > On 28/02/2008, Ramit Arora <[EMAIL PROTECTED]> wrote: >> >> Hi All, >> I am experimenting with ActiveMQ 5.0, & my clients are in Perl. While >> tinkering around, I managed to get Java clients to communicate with the >> broker using http. >> It seems that JMS commands are serialized into xml using XStream & sent >> over >> http. The broker deserializes them using XStream. >> When I tried sending http messages from Perl (using LWP & simple xml as >> the >> content of the messages), I got the following error on the broker: >> >> ERROR log - /topic/fooHTTP >> com.thoughtworks.xstream.alias.CannotResolveClassException: person : >> person >> at >> >> com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:35) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.XmlFriendlyMapper.realClass(XmlFriendlyMapper.java:44) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:49) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:46) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:52) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18) >> at >> >> com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:28) >> at >> >> com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:95) >> at >> >> com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:12) >> at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:521) >> at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:509) >> at com.thoughtworks.xstream.XStream.fromXML(XStream.java:475) >> at >> >> org.apache.activemq.transport.xstream.XStreamWireFormat.unmarshalText(XStreamWireFormat.java:55) >> at >> >> org.apache.activemq.transport.http.HttpTunnelServlet.doPost(HttpTunnelServlet.java:102) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at >> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) >> at >> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) >> at >> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) >> at >> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) >> at >> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) >> at org.mortbay.jetty.Server.handle(Server.java:295) >> at >> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) >> at >> >> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) >> at >> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) >> at >> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) >> at >> >> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) >> at >> >> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) >> >> How can I send http messages from Perl? >> >> Thanks, >> Ramit Arora >> >> >> -- >> View this message in context: >> http://www.nabble.com/Using-http-transport-from-a-Perl-client-tp15738834s2354p15738834.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://open.iona.com > > -- View this message in context: http://www.nabble.com/Using-http-transport-from-a-Perl-client-tp15738834s2354p15752863.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.