Springpython JMS接收器。MQSCO大小错误。给出:540,预计560

2024-09-28 21:00:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试用springpython连接JMS队列。我以官方springpython站点的接收方为例

enter code herefrom springpython.jms.core import JmsTemplate
from springpython.jms.factory import WebSphereMQConnectionFactory

qm_name = "my_qmname"
channel = "my_channel"
host = 'my_host'
listener_port = 'my_port'
queue1 = "MY_QUEUE"

# The connection factory we're going to use.
factory = WebSphereMQConnectionFactory(qm_name, channel, host, listener_port)

# Every JmsTemplate uses a connection factory for actually communicating with a JMS provider.
jms_template = JmsTemplate(factory)

# Get a message off the queue. The call to receive will by default time out
# after 1000ms and raise springpython.jms.NoMessageAvailableException then.
jms_template.receive(queue1)

# We're not using an IoC so we need to shut down the connection factory ourselves.
factory.destroy()

我得到下一个错误:

^{pr2}$

当我发现MQSCO与SSL有关时,如何解决这个问题? 谢谢你


Tags: tonameimporthostportmyfactorychannel