An Mqseries Error Occurred Completion Code 2 Reason Code 2033
Contents |
FacebookdeveloperWorks on TwitterdeveloperWorks on LinkedIndeveloperWorks on YouTubedeveloperWorks on Google+
INCORRECTLY RECEIVES REASON CODE 2033 WHEN PERFORMING AN MQGET OPERATION A fix is available Fix Pack 7.1.0.3 for WebSphere MQ V7.1 Subscribe You can track all active APARs for this
Mqget Failed With Reason Code 2033
component. APAR status Closed as program error. Error description When two or more applications mq completion code 2 reason 2085 are getting messages from a WebSphere MQ queue, an application using the WebSphere MQ classes for Java receives a 2033 mqje001 reason 2059 (MQRC_NO_MSG_AVAILABLE) reason code when performing a get operation on a MQQueue object, even though there are deliverable messages on the queue that satisfy the criteria of the MQGET request. com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason https://www.ibm.com/developerworks/community/forums/thread.jspa?threadID=390480 '2033' Local fix Problem summary **************************************************************** USERS AFFECTED: This issue affects users of the WebSphere MQ classes for JMS and WebSphere MQ classes for Java, including: - The WebSphere MQ V7.1/V7.5 classes for JMS. - The WebSphere MQ V7.1/V7.5 classes for Java. - The WebSphere MQ V7.1/V7.5 Resource Adapter. - The WebSphere Application Server V8.5 WebSphere MQ messaging provider. - The WebSphere Application Server V6.1 WebSphere MQ messaging provider http://www.ibm.com/support/docview.wss?uid=swg1IV36090 who have configured the WebSphere variable MQ_INSTALL_ROOT to point to a WebSphere MQ V7.1/V7.5 installation. who are getting messages from a queue using two or more client applications. Platforms affected: All Distributed (iSeries, all Unix and Windows) +Java +Java zOS **************************************************************** PROBLEM SUMMARY: When two or more WebSphere MQ classes for Java or WebSphere MQ classes for JMS clients attempted to read from the same WMQ queue, one of the clients would receive the message but the other client would receive the following return code: MQRC 2033 'MQRC_NO_MSG_AVAILABLE' or a null message if the WebSphere MQ classes for JMS client is being used. This reason code, or null message, was returned to the application regardless of the value of the wait interval was set on the MQGetMessageOptions structure for the MQGET, or the timeout parameter on the JMS receive call. The reason code, or null message, was also returned when the size of the message was larger than the default buffer size of 4Kb, even though other messages were available on the WMQ queue at the time and should have been returned. Problem conclusion The WebSphere MQ classes for Java and WebSphere MQ classes for JMS have been modified to ensure that the MQGET a
Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: WebSphere MQ: MQException: Completion Code 2, https://coderanch.com/t/77941/Websphere/MQ-MQException-Completion-Code-Reason Reason 2033 Vadim Prudnikov Greenhorn Posts: 2 posted 10 years ago Hi. Can you help me with the problem? I create MQQueueManager, send message and try to http://stackoverflow.com/questions/20823159/how-disable-mq-error-display-when-using-exception-hanling receive. Exception occurs on a message receiving (MQQueue.get). This is a code parts (i don't show exception catching): //manager creation MQEnvironment.hostname = host; MQEnvironment.port = port; MQEnvironment.channel = channel; code 2 MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES); //TCP/IP or server connnection. manager = new MQQueueManager(managerName); //method for a message sending public void sendMessage(String queueName, String msgText) throws MQException, IOException { int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING; MQQueue queue = manager.accessQueue(queueName, openOptions); MQMessage message = new MQMessage(); message.messageType = MQC.MQMT_DATAGRAM; message.format=MQC.MQFMT_STRING; message.persistence = MQC.MQPER_PERSISTENCE_AS_Q_DEF; message.write(msgText.getBytes()); MQPutMessageOptions pmo = new MQPutMessageOptions(); //i don't know if completion code 2 the following line is needed. //pmo.options = MQC.MQPMO_NEW_CORREL_ID | MQC.MQPMO_NEW_MSG_ID | MQC.MQPMO_FAIL_IF_QUIESCING; queue.put(message, pmo); queue.close(); } //method for a message receiving public String retrieveMessage(String queueName) throws Exception { int openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_INQUIRE; MQQueue queue = manager.accessQueue(queueName, openOptions); MQMessage message = new MQMessage(); message.messageId = MQC.MQMI_NONE; message.correlationId = MQC.MQCI_NONE; MQGetMessageOptions gmo = new MQGetMessageOptions(); //i don't know if the following 3 lines are needed. //gmo.options = MQC.MQGMO_WAIT | MQC.MQGMO_CONVERT | MQC.MQGMO_FAIL_IF_QUIESCING; //gmo.matchOptions = MQC.MQMO_MATCH_MSG_ID | MQC.MQMO_MATCH_CORREL_ID; //gmo.waitInterval = 60000; queue.get(message, gmo); String msgText = message.readString(message.getMessageLength()); queue.close(); return msgText; } queue.get(message, gmo); throws an exception. Help please what parameters are wrong? Many Thanks. Jesus Angeles Ranch Hand Posts: 2068 posted 10 years ago One possible reason for 2033 is timeout. Paul Clapham Sheriff Posts: 21416 33 I like... posted 10 years ago "Vad Pr", could you please review the JavaRanch name policy? In particular it says you must use a real name as your display name. You can change your display name here. Thank you for yo
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How disable MQ error display when using exception hanling up vote 0 down vote favorite I am using java API to interact with MQ. When I try to get a message from an empty queue, I get exception. Ok, but when I control it with try catch, I am expecting not prompted any error message in console. but I get!! try { queue.get(getMessage, new MQGetMessageOptions()); return getMessage.readUTF(); } catch (Exception e) { return ""; } get in console as "MQJE001: Completion Code '2', Reason '2033'." How can I disable this information output? how can I check message availability or current queue size? Thanks console websphere-mq share|improve this question edited Sep 17 '14 at 10:55 Morag Hughson 3,479229 asked Dec 29 '13 at 7:47 Moh Tarvirdi 190317 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted First question: How can I disable this information output? This link might help: Hide Java Output Second question: How can I check message availability or current queue size? MQQueue.getCurrentDepth() method will get you the current queue size. But you must note that this may not represent the correct queue depth at all times as messages could be consumed by other applications from the same queue. Actually you should not worry about queue depth. It is best practice to keep consuming messages and handle 2033 (MQJE001: MQRC_NO_MSG_AVAILABLE) exception which is thrown when there are no messages in the queue in your application. share|improve this answer answered Dec 29 '13 at 15:40 Shashi 9,6621330 add a comment| up vote 0 down vote