qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Welchlin <andr...@welchlin.de>
Subject Send a message using C++ which will be a JMS TextMessage
Date Mon, 08 Sep 2014 13:43:02 GMT
Hi List,

I am sending messages to a JMS Service which runs at a third party.

I use C++ qpid 0.28 with amqp 1.0.

When the message is created it looks like this:

     std::string messageContent("example text");
     qpidMessage.setContentType("text/plain");
     qpidMessage.setContent(qpid::types::Variant(messageContent));


The third party told me that it comes in as a ByteMessage but it must be 
a TextMessage.

I tried it out using an own java JMS Client (also with qpid 0.28):

             Message amqpMsg = consumer.receive();
             if (amqpMsg instanceof javax.jms.TextMessage)
             {
                 javax.jms.TextMessage txMsg = (javax.jms.TextMessage) 
amqpMsg;
                 log.info("TxtMsg: " + txMsg.toString());
             }
             else
             {
                 log.info("NO Text Message: " + amqpMsg.toString());
             }



I can also see that the message comes out as a ByteMessage.

I also wrote a test prorgram in java to send a message and the JMS 
client could read it as TextMessage.


Does anyone of you have an idea how I can create a JMS TextMessage using 
a c++ qpid program?

Is it right in from an AMQP perspective that it must be possible to 
create a TextMessage?

Regards,
Andreas








---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message