pymqi 连接ibm mq 的topic获得预订消息

问题遇到的现象和发生背景

pymqi 连接ibm mq 的topic获得预订消息

问题相关代码,请勿粘贴截图
import logging

import pymqi

logging.basicConfig(level=logging.INFO)

queue_manager = 'QM1'
channel = 'DEV.APP.SVRCONN'
host = '127.0.0.1'
port = '1414'
topic_string = '/currency/rate/EUR/USD'
msg = '1.3961'
conn_info = '%s(%s)' % (host, port)

qmgr = pymqi.QueueManager(None)
qmgr.connect_tcp_client(queue_manager, pymqi.CD(), channel, conn_info)

sub_desc = pymqi.SD()
sub_desc['Options'] = pymqi.CMQC.MQSO_CREATE + pymqi.CMQC.MQSO_RESUME + \
    pymqi.CMQC.MQSO_DURABLE + pymqi.CMQC.MQSO_MANAGED
sub_desc.set_vs('SubName', 'MySub')
sub_desc.set_vs('ObjectString', topic_string)

sub = pymqi.Subscription(qmgr)
sub.sub(sub_desc=sub_desc)

get_opts = pymqi.GMO(
    Options=pymqi.CMQC.MQGMO_NO_SYNCPOINT + pymqi.CMQC.MQGMO_FAIL_IF_QUIESCING + pymqi.CMQC.MQGMO_WAIT)
get_opts['WaitInterval'] = 15000

data = sub.get(None, pymqi.md(), get_opts)
logging.info('Here's the received data: [%s]' % data)

sub.close(sub_close_options=pymqi.CMQC.MQCO_KEEP_SUB, close_sub_queue=True)
qmgr.disconnect()


运行结果及报错内容

代码是从api文档截取的,使用后一直报MQI Error. Comp: 2, Reason 2033: FAILED: MQRC_NO_MSG_AVAILABLE,但是我的主题是有消息的。

我的解答思路和尝试过的方法

网上没有别人连接topic的案例

我想要达到的结果

我希望可以获得主题中预订的信息