activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <>
Subject Re: MapMessages from Python to Java
Date Tue, 27 Oct 2009 09:43:18 GMT

are you sure you're sending map messages from Python?

If you use Stomp protocol, you have to send your data xml or json encoded
and use "transformation" header to specify how data should be converted to
Java. I suggest you read this
look at StompTest (
for some more examples.

You can also use py-activemq ( lib
which can use OpenWire and CMS API to send map messages naturally.

Dejan Bosanac -

Open Source Integration -
ActiveMQ in Action -
Blog -

On Tue, Oct 27, 2009 at 2:04 AM, ngcdan12 <>wrote:

> Hello,
> I have a seperate application that was made in python that is currently
> using Active Mq to send map messages to a ACtive MQ server with a topic.  I
> then have another application written in java that has a message listener
> set up to receive messages from the same topic.  Now i have tested the
> Active Mq with pure java and I am able to send and receive mapMessages, and
> read their contents no problem with JMS API methods.  But when the python
> app uses active mqs built in methods to create a map message, and sends it
> to the server, I receive something, but am unable to read the contents of
> the message.  When I do something like a getString("marking") on the map
> message it comes up empty from the java side.
> So long problem short, problem is I can't read the mapMessage the Python
> app
> is sending out on my Java app.
> Thanks for any help you can provide.
> Here is a code snibbet of the python mapMessage
>        jmsMsg.setString("idString", msg.idStr)
>        jmsMsg.setString("typeString", msg.typeStr)
>        jmsMsg.setInt("marking",
>        jmsMsg.setInt("app",
> Here is the code snibbet of my Java message listener
> private class ExListener implements MessageListener
>    {
>        public void onMessage(Message msg)
>        {
>        MapMessage mapMsg = (MapMessage) msg;
>        try{System.out.println("getText() "+mapMsg.getString("marking"));
>        }catch(JMSException e) {}
>        }
>    }
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message