I tried... $stomp->subscribe( { destination => '/queue/Queue.Emails', 'ack' => 'client', 'activemq.prefetchSize' => 1, 'transformation' => 'jms-map-json' } );
but my client kept waiting.. however, when I do... $stomp->subscribe( { destination => '/queue/Queue.Emails', 'ack' => 'client', 'activemq.prefetchSize' => 1, 'transformation' => 'jms-map-xml' } ); the client prints the message. what am I doing wrong? thanks Nishant Dejan Bosanac wrote: > > Yup, you can use jms-map-xml (or json), jms-object-xml (or json) and > jms-byte > > Cheers > -- > Dejan Bosanac > > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > > > On Thu, Aug 20, 2009 at 2:48 PM, nmittal <nmit...@rblt.com> wrote: > >> >> That was it, I wasnt using any transformation. Now i see the body as >> XML.. >> thanks a lot Dejan. Also, is there a jms-map-json? >> >> thanks again >> Nishant >> >> >> Dejan Bosanac wrote: >> > >> > Hi, >> > >> > I'm not sure your Perl client supports messages transformation, but you >> > have >> > to add "transformation" header to your subscribe frame (such as >> > 'transformation' => 'jms-map-xml'). >> > >> > Take a look at >> > http://activemq.apache.org/stomp.html#Stomp-Messagetransformations >> > and StompTest unit test for more info and examples on the topic. >> > >> > But as I said, your Stomp client must play along as well. >> > >> > Cheers >> > -- >> > Dejan Bosanac >> > >> > Open Source Integration - http://fusesource.com/ >> > ActiveMQ in Action - http://www.manning.com/snyder/ >> > Blog - http://www.nighttale.net >> > >> > >> > On Wed, Aug 19, 2009 at 7:25 PM, nmittal <nmit...@rblt.com> wrote: >> > >> >> >> >> Hi, Has anyone been able to write a Perl client that reads MapMessges >> off >> >> of >> >> an ActiveMQ queue? >> >> >> >> We have a C++ ActiveMQ client that is sending MapMessages to the >> broker. >> >> However, the Perl client using Net::Stomp says that the body is >> >> undefined. >> >> Below is the message as seen in the activemq admin web interface… >> >> >> >> {msg=<table cellpadding=5 cellspacing=0><tr><td colspan=4 >> align=center>At >> >> 2009-08-19 08:21:41</td></tr><tr style="background-color:Blue; >> >> color:White; >> >> font-weight:bold"><td style="font-weight: bold" >> >> align="right"></td><td>Avg >> >> ticks/sec</td><td>Max ticks/sec</td><td>Total ticks</td></tr><tr><td >> >> style="font-weight: bold" align="right">Last 15 minutes</td><td >> >> align="right">30</td><td align="right">68</td><td >> >> align="right">26661</td></tr><tr><td style="font-weight: bold" >> >> align="right">Today</td><td align="right">6</td><td >> >> align="right">177</td><td align="right">177790</td></tr></table>, >> >> email=nmit...@rblt.com, subject=RSIGrid: FeedHandler Tick Update} >> >> >> >> My perl code is … >> >> #!/usr/bin/perl -w >> >> >> >> use strict; >> >> use Net::Stomp; >> >> >> >> >> >> my $broker = defined($ARGV[0])? $ARGV[0] : "localhost"; >> >> >> >> my $stomp = Net::Stomp->new( { hostname => $broker, port => '61613' } >> ); >> >> $stomp->connect(); >> >> $stomp->subscribe( >> >> { destination => '/queue/Queue.Emails', >> >> 'ack' => 'client', >> >> 'activemq.prefetchSize' => 1 >> >> } >> >> ); >> >> >> >> while (1) { >> >> my $frame = $stomp->receive_frame; >> >> print $frame->body; >> >> # $stomp->ack( { frame => $frame } ); >> >> } >> >> $stomp->disconnect; >> >> >> >> The output of the above program is… >> >> $ ./emailer.pl >> >> Use of uninitialized value in print at ./emailer.pl line 20, <GEN0> >> line >> >> 12. >> >> >> >> Any help on this is appreciated. >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/PERL-STOMP%3A-MapMessages-tp25048522p25048522.html >> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> >> >> >> > >> > >> > ----- >> > Dejan Bosanac >> > >> > Open Source Integration - http://fusesource.com/ >> > ActiveMQ in Action - http://www.manning.com/snyder/ >> > Blog - http://www.nighttale.net >> > >> >> -- >> View this message in context: >> http://www.nabble.com/PERL-STOMP%3A-MapMessages-tp25048522p25061359.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > ----- > Dejan Bosanac > > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > -- View this message in context: http://www.nabble.com/PERL-STOMP%3A-MapMessages-tp25048522p25061617.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.