CreateTopic 上的 IBM MQ XMS 错误 2085

IBM MQ XMS error 2085 on CreateTopic

我正在尝试创建主题并向 IBM MQ 主题发布消息。我收到 2085 MQ 异常并确定如何解决此问题。
IBM.XMS.dll 我使用的版本是 8.0.0.6。

控制台应用代码:

    static void Main(string[] args)
    {
        try
        {
            XMSFactoryFactory factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);

            IConnectionFactory connectionFactory = factoryFactory.CreateConnectionFactory();
            Console.WriteLine("Connection Factory created.");

            connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "MQ_TX_MGR");
            connectionFactory.SetStringProperty(XMSC.WMQ_CONNECTION_NAME_LIST, "10.10.10.10(1414)");
            connectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, "CL.SVRCONN");

            connectionFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT);
            connectionFactory.SetIntProperty(XMSC.WMQ_CLIENT_RECONNECT_OPTIONS, XMSC.WMQ_CLIENT_RECONNECT);
            connectionFactory.SetIntProperty(XMSC.WMQ_CLIENT_RECONNECT_TIMEOUT, 3); 

            mqConnection = connectionFactory.CreateConnection();
            Console.WriteLine("Connection created.");

            session = mqConnection.CreateSession(false, AcknowledgeMode.AutoAcknowledge);
            Console.WriteLine("Session created.");


            IDestination destination = session.CreateTopic("topic://TOPIC/NAME"); // destinationName
            Console.WriteLine("Destination created.");

            // create producer
            IMessageProducer producer = session.CreateProducer(destination);  //My Code is erroring out at this line.

        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
        }
        finally
        {
            Console.WriteLine("Program waiting for message:");
            Console.ReadLine();
        }

    }

异常详情:

Error Message:
CWSMQ0006E: An exception was received during the call to the method WmqV6Session.SetupPubSub: CompCode: 2, Reason: 2085. During execution of the specified method an exception was thrown by another component. See the linked exception for more information.

Linked Exception Reason: 2085

Linked Exception Stack Trace:
at IBM.WMQ.MQDestination.Open(MQObjectDescriptor& od) at IBM.WMQ.MQQueue..ctor(MQQueueManager qMgr, String queueName, Int32 openOptions, String queueManagerName, String dynamicQueueName, String alternateUserId) at IBM.WMQ.MQQueueManager.AccessQueue(String queueName, Int32 openOptions, String queueManagerName, String dynamicQueueName, String alternateUserId) at IBM.WMQ.MQQueueManager.AccessQueue(String queueName, Int32 openOptions) at IBM.XMS.Client.WMQ.MqV6Impl.WmqV6Session.SetUpPubSub(Boolean startCleanup)

指定主题目标的语法必须以 "topic://" 开头。例如 session.CreateTopic("topic://Score/Football")。请参阅文档 here 了解更多详情。

确保您的 SVRCONN 频道的 SHARECNV 值为 1 或更高。

IBM MQ v8 知识中心页面“MQI client: Default behavior of client-connection and server-connection channels”记录了以下关于 SHARECNV(0) 的内容:

This value specifies no sharing of conversations over a TCP/IP socket. The channel instance behaves exactly as if it was a Version 6.0 server or client connection channel, and you do not get the extra features such as bi-directional heartbeats that are available when you set SHARECNV to 1 or greater. Only use a value of 0 if you have existing client applications that do not run correctly when you set SHARECNV to 1 or greater.

IBM MQ v8 知识中心页面“XMSC_WMQ_PROVIDER_VERSION”记录了以下内容:

By default this property is set to "unspecified".

...

IBM WebSphere MQ Version 7.0 specific features are disabled if XMSC_WMQ_PROVIDER_VERSION is set to UNSPECIFIED and SHARECNV is set to 0.

这将导致 XMS 尝试使用 STREAM 队列发布排队 publish/subscribe 的消息。将其设置为 1 或更高以获得 v7 样式连接并使用正常 v7 集成 publish/subscribe.

在过去的一些版本中,设置 SHARECNV(0) 是解决某些问题的方法,我不知道有任何 v8 问题可以解决此问题。