qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomáš Šoltys <tomas.sol...@gmail.com>
Subject XML exchange not receiving any message
Date Fri, 01 Mar 2013 13:04:15 GMT
Hi,

I am trying to setup an  XMLexchange and send some message to it. Here is
what I did but for some reason I do not see any messages on the exchange.
Can someone please tell me what am I doing wrong?


$> qpid-config -a admin/admin@cbgd03:29999 add exchange xml xml-exchange
$> qpid-config -a admin/admin@cbgd03:29999 add queue xml-queue
$> qpid-config -a admin/admin@cbgd03:29999 bind xml-exchange xml-queue
XMLtest -f xquery.xml


content of xquery.xml:
------------------------------------------------------------------------
let $w := ./FIXML return $w/TrdCaptRpt/@TransTyp = 2
------------------------------------------------------------------------


Python scripts which sends message:
------------------------------------------------------------------------
#! /usr/bin/python

import sys
from qpid.messaging import *
from qpid.log import enable, DEBUG

request_address = "xml-exchange; { node: { type: topic, x-declare: { type:
xml } }, create: never }"
reply_adress = "response/response_queue; { create: receiver, node: { type:
topic } }"

connection = Connection(host="myhost", port=21234, username="user",
password="pass")

try:
    connection.open()
    session = connection.session()
    sender = session.sender(request_address)

    message_text = "<FIXML><TrdCaptRpt TransTyp=2></TrdCaptRpt></FIXML>"
    message = Message(message_text, durable=True, reply_to=reply_adress)

    sender.send(message, sync=False, timeout=1000);
    sender.sync(1000)

    session.acknowledge()

except MessagingError,m:
    print m

finally:
    connection.close()
------------------------------------------------------------------------

Regards,
Tomas Soltys

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