トピックを作成してIBM MQトピックにメッセージを発行しようとしています。 2085 MQの例外が発生しており、これを解決する方法がわかりました。
使用しているIBM.XMS.dllのバージョンは8.0.0.6です。CreateTopicのIBM MQ XMSエラー2085
コンソールアプリコード:
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)
「IBM.XMS.dll」のどのMQのどのバージョンで、接続しているキュー・マネージャー上でどのバージョンのMQが実行されていますか? – JoshMc
@ JoshMcクライアントとサーバーの両方に8.0.06がある – PushCode
SVRCONNチャネルのSHARECNV値を確認できますか? – JoshMc