How to Get-Inhibit the WebSphere MQ Queue?

女生的网名这么多〃 提交于 2019-12-06 07:22:17

问题


There is a property for WebSphere MQ queue to inhibit GET from the queue. To set this property I found two ways.

  1. Just set the property using WebSphere MQ Explorer GUI.
  2. Alter the queue with the MQSC command ALTER QLOCAL(TEST) GET(DISABLED).

Is there any way to enable or disable GET on a WebSphere MQ queue through a Java Program?


回答1:


You can use PCF Change, Copy, and Create Queue command to change the attributes of the queue. This can be used from Java with the aid of the PCF Java helper classes, see Handling PCF Messages with IBM MQ classes for Java

InhibitGet (MQCFIN)

Get operations are allowed or inhibited (parameter identifier: MQIA_INHIBIT_GET ).

The value can be:

MQQA_GET_ALLOWED

Get operations are allowed.

MQQA_GET_INHIBITED

Get operations are inhibited.




回答2:


Sure. When you open the queue for GET or for PUT you can include the SET option and then use the MQSET API call.

  • MQOpen options
  • Open options for setting attributes
  • Setting queue attributes


来源:https://stackoverflow.com/questions/30233976/how-to-get-inhibit-the-websphere-mq-queue

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