JMS exception when a Property is sent to java broker from qpid-cpp

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

JMS exception when a Property is sent to java broker from qpid-cpp

sivasnp
Hi,
   I am getting an exception when a property value is sent from qpid-cpp(1.35) to a client which is running a java broker.

From Sender(qpid-cpp) I am doing the following:
qpid::messaging::message msg;
std::string id = "xyztry";
msg.setProperty("a", id);
msg.getProperties()["a"].setEncoding("utf8");

On the receiver, I am getting the following error
JMS exception : getString("a") failed as value of type class [B is an array.

Additionally, when I capture messages through wireshark, I see the type of "a" is uimplemented type".

Any help is appreciated.

Thanks,
Siva.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JMS exception when a Property is sent to java broker from qpid-cpp

Gordon Sim
On 10/08/17 23:10, sivasnp wrote:

> Hi,
>     I am getting an exception when a property value is sent from
> qpid-cpp(1.35) to a client which is running a java broker.
>
>  From Sender(qpid-cpp) I am doing the following:
> qpid::messaging::message msg;
> std::string id = "xyztry";
> msg.setProperty("a", id);
> msg.getProperties()["a"].setEncoding("utf8");
>
> On the receiver, I am getting the following error
> JMS exception : getString("a") failed as value of type class [B is an array.
>
> Additionally, when I capture messages through wireshark, I see the type of
> "a" is uimplemented type".
>
> Any help is appreciated.
Is the sender sending over AMQP 0-10 (as opposed to AMQP 1.0)? Which
version of the java broker are you using?

I did a test with the attached send.cpp and 6.1.3 of the broker. When
sending over AMQP 1.0, the property value is correctly encoded as a
string (typecode 0xa1). Whether sending over AMQP 0-10 or AMQP 1.0, a
JMS receiver example (also attached) can successfully retrieve the
property via getStringProperty().


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

send.cpp (1K) Download Attachment
Receiver.java (4K) Download Attachment
Loading...