qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fadams <fraser.ad...@blueyonder.co.uk>
Subject Getting QMF2 "qmf.opcode" in JMS seems to vary between a String and byte[]
Date Fri, 22 Jul 2011 18:20:53 GMT
OK this one is weird....

As I'm exploring QMF2 in JMS I've been playing with getting Agent

I've got code as follows:

String agent = message.getStringProperty("qmf.agent");
String opcode = message.getStringProperty("qmf.opcode");

Which works perfectly for the Broker Agent, but when I tried firing up the
example agent in qpid-0.10/cpp/bindings/qmf2/examples/cpp I get exceptions:

javax.jms.MessageFormatException: getString("qmf.opcode") failed as value of
type class [B is an array.

I wonder if this is related to the posting "c++ 0.10 client, java 0.10
broker, headers exchange not routing "

The answer there was:

Try adding a line after that something like the following:


But clearly in my case this is in the Agent (or more likely the broker)

Is there anything I can do on my Java JMS side to get things to behave
consistently - or do I have to resort to checking the property type and if
it's a byte[] construct a new String from the byte[]

I'd appreciate thoughts


View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/Getting-QMF2-qmf-opcode-in-JMS-seems-to-vary-between-a-String-and-byte-tp6611387p6611387.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message