I am having a ongoing problem trying to create a topic publisher from seemingly simple java code. My WMQ is administered separately in the company so I have no direct control of it.
I try to connect to the topic by creating a TopicConnection
, then a TopicSession
and then a TopicPublisher
, using fairly standard Java code albeit over SSL so setting some additional system props. However I have the same problem with or without SSL I am fairly certain.
On the line
this.topicPublisher = this.topicPublisherSession.createPublisher(this.topic);
a WMQ exception is raised as follows
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:209)
The WMQ administrator can provide a "fix" for me by granting auths on the SYSTEM.BASE.TOPIC
. However this is disallowed by company risk policy.
I have been asked why do I need access to the base topic, but of course I do not need that access. I just simply need to publish to my topic.
Any WMQ experts got any other ideas please? Thanks so much.