qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Wenske <daniel.wen...@gmail.com>
Subject Can not read Properties using qpid 0.28 from ActiveMq Message Broker
Date Thu, 22 Jan 2015 16:32:08 GMT
Hi everyone,

I am using the qpid 0.28 messaging api.

There is a problem when I try to read properties of amqp 1.0 messages from
an ActiveMq message broker.

It is possible to read the fields like userId and I can also read the
content. But when I read the properties with the following code I do not
get them:

------------------------------------------------

const qpid::types::Variant::Map& map = mMessage.getProperties();

std::cout << "Property map size: " << map.size() << std::endl;

for (qpid::types::Variant::Map::const_iterator it = map.begin(); it !=
map.end(); ++it) {

     std::cout << "- Key: " << it->first << " Value: " << it->second.
asString() << std::endl;

}

------------------------------------------------

 The output is just this:

------------------------------------------------

Property map size: 1

- Key: x-opt-to-type Value: topic

------------------------------------------------

 I switched on the qpid library logging and can see the properties are
there. It shows the following:

 ------------------------------------------------

[b9cbdccd-8dec-46e6-a777-4d47e5d80c5a]: 0 <- @transfer(20) [handle=2,
delivery-id=36, delivery-tag=b"3", message-format=0] (1824705)
"\x00Sp\xc0\x04\x02AP\x04\x00Sr\xc1\x17\x02\xa1\x0dx-opt-to-type\xa1\x05topic\x00Ss\xc0m\x0a\xa1;ID:er0jb01.
ttt.aaa-56349-1421830015225-3:12667:22:2:202@\xa1\x1dtopic://USERA.
MasterDataTopic
@@@@@@\x83\x00\x00\x01K\x12PS\x86\x00St\xc18\x02\xa1\x15uniqueMessageTypeCode\xa1\x1eRD_SNAPSHOT_ALT_INSTRUMENT_IDS\x00Sw\xb1\x00\x1b\xd6\xe5<?
xml version="1.0" encoding="UTF-8" standalone="yes"?>... (truncated, msg
content follows...)

 ------------------------------------------------

I am expecting a field called uniqueMessageTypeCode (which I see in the
dump above) containing a string value RD_SNAPSHOT_ALT_INSTRUMENT_IDS -
which also seems to be in place. x-opt-to-type (with value "topic") is also
contained, but I manage to extract only this one, not the one I am actually
interested in.

Any help is greatly appreciated & thanks in advance

Daniel

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