You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Tim Bain <tb...@alumni.duke.edu> on 2016/04/01 16:39:15 UTC
Re: ActiveMQ Object Message to json transformation not working
I would have assumed that object serialization and deserialization would
either both happen on the broker or neither happen on the broker, and that
if serialization was going to happen (and fail due to a missing JAR) on the
broker at dispatch time, deserialization would have had to happen at
enqueue time, which would have failed due to a missing JAR. I'm not seeing
the situation where a missing JAR causes this (though I haven't made any
effort to trace the code); am I missing something?
Tim
On Thu, Mar 31, 2016 at 1:08 AM, James A. Robinson <ji...@highwire.org>
wrote:
> I think what it boils down to is figuring out where you need to put the jar
> to make it available to the class loader in the java instance that is
> running your broker.
>
> So, for example, on my Linux setup I have a directory
>
> /usr/share/activemq/lib
>
> that contains the jars needed to run ActiveMQ and I could place a jar there
> if I needed to add new deserialization classes.
>
> In my particular case I've got this running under a tanukiwrapper, and
> another option is to add a new directory to the
> /etc/activemq/activemq-wrapper.conf that points to a new jar directory.
> E.g., extending this block of configuration:
>
> # Java Classpath (include wrapper.jar) Add class path elements as
> # needed starting from 1
> set.default.ACTIVEMQ_HOME=/usr/share/activemq
> wrapper.java.classpath.1=/usr/share/java/tanukiwrapper.jar
> wrapper.java.classpath.2=%ACTIVEMQ_HOME%/lib/*
> wrapper.java.classpath.3=%ACTIVEMQ_HOME%/lib/web/*
> wrapper.java.classpath.4=%ACTIVEMQ_HOME%/lib/extra/*
> wrapper.java.classpath.5=%ACTIVEMQ_HOME%/lib/optional/*
> wrapper.java.classpath.6=%ACTIVEMQ_HOME%/lib/camel/*
>
>
> Jim
>
>
> On Wed, Mar 30, 2016 at 11:54 PM xabhi <xa...@gmail.com> wrote:
>
> > How do I make sure that this class is available at broker side?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Object-Message-to-json-transformation-not-working-tp4709447p4710145.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
Re: ActiveMQ Object Message to json transformation not working
Posted by xabhi <xa...@gmail.com>.
A little unrelated question but does using 'transformation' header on STOMP
consumer causes throughput drop?
I tested it with jms-map-json transformation and throughput dropped to 200
msgs/s when compared to that simple text messages.
Should i do transformation to text message in my Java application? What will
i be losing if i do that because throughput is real concern for me.
I have asked this question here:
http://activemq.2283324.n4.nabble.com/JMS-to-STOMP-transformation-causes-throughput-drop-in-STOMP-consumers-td4710148.html
<http://activemq.2283324.n4.nabble.com/JMS-to-STOMP-transformation-causes-throughput-drop-in-STOMP-consumers-td4710148.html>
Sorry for asking this question here but nobody replied there.
Any pointers on what could be causing it would help me greatly. Thanks for
all the help.
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Object-Message-to-json-transformation-not-working-tp4709447p4710243.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Object Message to json transformation not working
Posted by Tim Bain <tb...@alumni.duke.edu>.
Ah, I had assumed (for no good reason, on rereading) that the producer was
also STOMP. If not, disregard my question.
On Apr 1, 2016 9:01 AM, "James A. Robinson" <ji...@highwire.org> wrote:
> Since he says he can send a generic JSON message, I assume that is without
> the "transformation=jms-object-json" message header, the system is properly
> mapping JSON to a generic Java Object, right? If the custom mapping failed
> I assumed that would mean the class defined in the
> META-INF/services/org/apache/activemq/transport/frametranslator/
> mapping was a likely culprit.
>
> Jim
>
> On Fri, Apr 1, 2016 at 7:39 AM Tim Bain <tb...@alumni.duke.edu> wrote:
>
> > I would have assumed that object serialization and deserialization would
> > either both happen on the broker or neither happen on the broker, and
> that
> > if serialization was going to happen (and fail due to a missing JAR) on
> the
> > broker at dispatch time, deserialization would have had to happen at
> > enqueue time, which would have failed due to a missing JAR. I'm not
> seeing
> > the situation where a missing JAR causes this (though I haven't made any
> > effort to trace the code); am I missing something?
> >
> > Tim
> >
> > On Thu, Mar 31, 2016 at 1:08 AM, James A. Robinson <ji...@highwire.org>
> > wrote:
> >
> > > I think what it boils down to is figuring out where you need to put the
> > jar
> > > to make it available to the class loader in the java instance that is
> > > running your broker.
> > >
> > > So, for example, on my Linux setup I have a directory
> > >
> > > /usr/share/activemq/lib
> > >
> > > that contains the jars needed to run ActiveMQ and I could place a jar
> > there
> > > if I needed to add new deserialization classes.
> > >
> > > In my particular case I've got this running under a tanukiwrapper, and
> > > another option is to add a new directory to the
> > > /etc/activemq/activemq-wrapper.conf that points to a new jar directory.
> > > E.g., extending this block of configuration:
> > >
> > > # Java Classpath (include wrapper.jar) Add class path elements as
> > > # needed starting from 1
> > > set.default.ACTIVEMQ_HOME=/usr/share/activemq
> > > wrapper.java.classpath.1=/usr/share/java/tanukiwrapper.jar
> > > wrapper.java.classpath.2=%ACTIVEMQ_HOME%/lib/*
> > > wrapper.java.classpath.3=%ACTIVEMQ_HOME%/lib/web/*
> > > wrapper.java.classpath.4=%ACTIVEMQ_HOME%/lib/extra/*
> > > wrapper.java.classpath.5=%ACTIVEMQ_HOME%/lib/optional/*
> > > wrapper.java.classpath.6=%ACTIVEMQ_HOME%/lib/camel/*
> > >
> > >
> > > Jim
> > >
> > >
> > > On Wed, Mar 30, 2016 at 11:54 PM xabhi <xa...@gmail.com> wrote:
> > >
> > > > How do I make sure that this class is available at broker side?
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Object-Message-to-json-transformation-not-working-tp4709447p4710145.html
> > > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > > >
> > >
> >
>
Re: ActiveMQ Object Message to json transformation not working
Posted by "James A. Robinson" <ji...@highwire.org>.
Since he says he can send a generic JSON message, I assume that is without
the "transformation=jms-object-json" message header, the system is properly
mapping JSON to a generic Java Object, right? If the custom mapping failed
I assumed that would mean the class defined in the
META-INF/services/org/apache/activemq/transport/frametranslator/
mapping was a likely culprit.
Jim
On Fri, Apr 1, 2016 at 7:39 AM Tim Bain <tb...@alumni.duke.edu> wrote:
> I would have assumed that object serialization and deserialization would
> either both happen on the broker or neither happen on the broker, and that
> if serialization was going to happen (and fail due to a missing JAR) on the
> broker at dispatch time, deserialization would have had to happen at
> enqueue time, which would have failed due to a missing JAR. I'm not seeing
> the situation where a missing JAR causes this (though I haven't made any
> effort to trace the code); am I missing something?
>
> Tim
>
> On Thu, Mar 31, 2016 at 1:08 AM, James A. Robinson <ji...@highwire.org>
> wrote:
>
> > I think what it boils down to is figuring out where you need to put the
> jar
> > to make it available to the class loader in the java instance that is
> > running your broker.
> >
> > So, for example, on my Linux setup I have a directory
> >
> > /usr/share/activemq/lib
> >
> > that contains the jars needed to run ActiveMQ and I could place a jar
> there
> > if I needed to add new deserialization classes.
> >
> > In my particular case I've got this running under a tanukiwrapper, and
> > another option is to add a new directory to the
> > /etc/activemq/activemq-wrapper.conf that points to a new jar directory.
> > E.g., extending this block of configuration:
> >
> > # Java Classpath (include wrapper.jar) Add class path elements as
> > # needed starting from 1
> > set.default.ACTIVEMQ_HOME=/usr/share/activemq
> > wrapper.java.classpath.1=/usr/share/java/tanukiwrapper.jar
> > wrapper.java.classpath.2=%ACTIVEMQ_HOME%/lib/*
> > wrapper.java.classpath.3=%ACTIVEMQ_HOME%/lib/web/*
> > wrapper.java.classpath.4=%ACTIVEMQ_HOME%/lib/extra/*
> > wrapper.java.classpath.5=%ACTIVEMQ_HOME%/lib/optional/*
> > wrapper.java.classpath.6=%ACTIVEMQ_HOME%/lib/camel/*
> >
> >
> > Jim
> >
> >
> > On Wed, Mar 30, 2016 at 11:54 PM xabhi <xa...@gmail.com> wrote:
> >
> > > How do I make sure that this class is available at broker side?
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Object-Message-to-json-transformation-not-working-tp4709447p4710145.html
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> >
>