You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by bondyk <bo...@gmail.com> on 2014/08/01 09:00:03 UTC
Problem with sending XML body via JMX's
sendTextMessageWithProperties
I'm trying to send XML message with properties using
DestinationViewMBean.sendTextMessageWithProperties(...) method. It accepts a
comma separated list of key=value pairs where we can specify the body and
other properties (body=<?xml version="1.0"
encoding="UTF-8"?>,CustomProperty='a=b'). In case if value of any property
contains character '=' (for example xml with attributes) then such property
will be skipped.Is this a bug?
--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-with-sending-XML-body-via-JMX-s-sendTextMessageWithProperties-tp4684015.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Problem with sending XML body via JMX's
sendTextMessageWithProperties
Posted by bondyk <bo...@gmail.com>.
Thanks. Method DestinationViewMBean.sendMessage(Map headers, String body)
works well. I wrote a small class that uses it so the problem is solved.
Method sendTextMessageWithProperties I tried to use from JConsole because
sendMessage(Map headers, String body) is not possible to invoke (requires
object Map to be passed).
--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-with-sending-XML-body-via-JMX-s-sendTextMessageWithProperties-tp4684015p4684041.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Problem with sending XML body via JMX's
sendTextMessageWithProperties
Posted by kimmking <ki...@gmail.com>.
This method split its param string by "," and "=", so if your text contains them, the result will be not expected.
For exam, your custom XML property with character "=" will be ignore.
Instead, you can use DestinationViewMBean.sendMessage(Map headers, String body);
Param headers can work well as your wish here.
From: bondyk [via ActiveMQ]
Date: 2014-08-01 15:00
To: kimmking
Subject: Problem with sending XML body via JMX's sendTextMessageWithProperties
I'm trying to send XML message with properties using DestinationViewMBean.sendTextMessageWithProperties(...) method. It accepts a comma separated list of key=value pairs where we can specify the body and other properties (body=,CustomProperty='a=b'). In case if value of any property contains character '=' (for example xml with attributes) then such property will be skipped. Is this a bug?
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/Problem-with-sending-XML-body-via-JMX-s-sendTextMessageWithProperties-tp4684015.html
To unsubscribe from ActiveMQ - User, click here.
NAML
--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-with-sending-XML-body-via-JMX-s-sendTextMessageWithProperties-tp4684015p4684040.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.