如何创建qmgr别名 [英] How to create a qmgr alias

查看:115
本文介绍了如何创建qmgr别名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个虚拟ip,它指向2个分别具有qmgrs qm1和qm2的服务器. 我需要一个qmgr别名才能将其提供给另一个应用程序,以便他们可以使用qmgr别名来调用虚拟ip,并且qmgr别名应相应地指向特定服务器的qmgr.

I have a virtual ip which points to 2 servers having qmgrs qm1 and qm2 respectively. I need a qmgr alias to give it to another application so that they can call the virtual ip with the the qmgr alias and the qmgr alias should point to the particular server's qmgr accordingly.

我做了什么:
我已经创建了qmgr别名,如下所示.
在具有QM1的服务器1中:

What I did:
I have created qmgr alias as follows.
In server 1 with QM1:

Define qremote(QMALIAS)  rname('')  rqmname(QM1)  xmitq(x)

在server2中:

Define qremote(QMALIAS)  rname('')  rqmname(QM2)  xmitq(x)

当另一个应用程序尝试访问virtualip和QMALIAS时,我收到2059错误.

I get a 2059 error from the other application when it tries to access the virtualip and QMALIAS.

我使用IBM MQ. 有人可以帮忙吗?

I use IBM MQ. Can someone please help?

推荐答案

您说您从应用程序中收到了2059错误,我想您的意思是2058(MQRC_Q_MGR_NAME_ERROR).

You said you get a 2059 error from the application, I think you mean a 2058 (MQRC_Q_MGR_NAME_ERROR).

在QMALIAS的QREMOTE定义中,应将XMITQ留空:

In the QREMOTE definitions for a QMALIAS you should leave the XMITQ blank:

DEFINE QREMOTE(QMALIAS) RNAME('') RQMNAME(QM1) XMITQ('')
DEFINE QREMOTE(QMALIAS) RNAME('') RQMNAME(QM2) XMITQ('')

在客户端,您有两种选择可以完成这项工作:

On the client side you have two choices to make this work:

  1. 请勿在MQCONN调用上指定队列管理器名称,请将其保留为空白(NULL)或仅保留空格.
  2. 在MQCONN调用的队列管理器名称中放置一个*,例如:*QMALIAS或简称为*.
  1. Do not specify the queue manager name on the MQCONN call, either leave it blank (NULL) or spaces only.
  2. Place a * in the queue manager name on the MQCONN call, ex: *QMALIAS or simply *.

这将导致客户端不检查RQMNAME是否与MQCONN调用中的名称匹配,然后将不生成2058(MQRC_Q_MGR_NAME_ERROR).

This will cause the client to not check that the RQMNAME matches the name in the MQCONN call and it will then not produce the 2058 (MQRC_Q_MGR_NAME_ERROR).

还要注意,如果在MQOPEN调用中将BASE QMNAME留为空白,则不需要客户端应用程序的QMALIAS条目.如果您还需要支持通过VIP连接的远程队列管理器,那么您将需要QMALIAS.

Also note that if you leave the BASE QMNAME blank on MQOPEN calls you do not need the QMALIAS entries for client apps. If you need to also support remote queue managers connecting through the VIP, then you will need the QMALIAS for that purpose.

这篇关于如何创建qmgr别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆