How to create a qmgr alias

不羁岁月 提交于 2020-01-15 09:29:09

问题


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.

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

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

In server2:

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

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

I use IBM MQ. Can someone please help?


回答1:


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

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. 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 *.

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).

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.



来源:https://stackoverflow.com/questions/42438479/how-to-create-a-qmgr-alias

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!