Error Mq 2045
Contents |
get/browse a message from a non-local queue Technote (FAQ) Question You put a message into a WebSphere MQ (WMQ) remote queue definition in mq error 2085 local QMgr1 and the message is sent to an associated queue in mq error 2059 remote QMgr2. However, you want to know if you can read a message from a remote queue definition? mq error code 2045 Similarly with clustered queues: you can put a message into a definition of a clustered queue which has no local storage in QMgr1 and it is sent to the corresponding
Mq Reason 2045
local queue in QMgr2. You want to know if you can read a message from a definition of a clustered queue? Answer Regarding the MQ GET function, an application can ONLY get, browse or read messages from a local queue which resides inside a queue manager, such as QMgr1. It is NOT possible to get or browse messages when connected com.ibm.mq.mqexception: mqje001: completion code '2', reason '2045' to QMgr1 from a remote queue which resides in another queue manager, such as QMgr2. This applies to remote queue definitions and to clustered queues, where the local queue is in a remote queue manager. It is not possible to extrapolate the behavior from the PUT function to the GET function. The PUT function allows you to connect to QMgr1 and then put a message into a remote queue which resides in QMgr2, via a remote queue definition and a transmission queue, or via a clustered queue and associated MQ clustering framework. Example: 1) Create a QREMOTE (remote queue definition) C:\> runmqsc QM_ANGELILLO define qremote(QR1) 1 : define qremote(QR1) AMQ8006: WebSphere MQ queue created. 2) Use the MQ sample to get a message: C:\> amqsget QR1 QM_ANGELILLO Sample AMQSGET0 start MQOPEN ended with reason code 2045 unable to open queue for input Sample AMQSGET0 end 3) Find out the short description of the reason code 2045 by using the MQ mqrc utility: C:\> mqrc 2045 2045 0x000007fd MQRC_OPTION_NOT_VALID_FOR_TYPE Cross reference information Segment Product Component Platform Version Edition Bu
ISSUED WHEN IT IS USED AUTO-RECONNECT WITH TEMPORARY QUEUES Subscribe to this APAR By subscribing, you receive periodic emails alerting you to the status of the APAR, along ('mqcc_failed') reason '2045' ('mqrc_option_not_valid_for_type') with a link to the fix after it becomes available. You can track
Jmswmq1017: Non-local Mq Queue Not Valid For Receiving Or Browsing.
this item individually or track all items by product. Notify me when this APAR changes. Notify me when an APAR
Mqje001: Completion Code 2, Reason 2037
for this component changes. APAR status Closed as program error. Error description An error is issued when it uses JMS and WMQ Ver.7.1.0. If it is used auto-reconnect facility, the following error is received http://www-01.ibm.com/support/docview.wss?uid=swg21650274 when an application loses connection to a QM and it reconnects back to other different QM: JMSWMQ1017: non-local MQ queue 'MQ.QM.TEMP' not valid for receiving or browsing.] [JMSWMQ1017] [The MQ queue is not able to be opened, as it not local to the connected Queue Manager. ] [Connect to the Queue Manager for which this MQ Queue resides locally.] [{XMSC_DESTINATION_NAME=MQ.QM.TEMP}] The MQ.QM.TEMP model queue is correctly defined http://www.ibm.com/support/docview.wss?uid=swg1IV66241 in both Queue Managers. The model queue is defined with QSGDISP(QMGR) in both Queue Managers. Error is because a JMS Connection object stores some information about the queue manager that they had originally connected to. This information is then used when an application creates a JMS Session from a JMS Connection, and then calls: Session.createTemporaryQueue() However, if automatic reconnection takes place, the queue manager name that had previously been stored is not updated. This means that, if an application calls: Session.createTemporaryQueue() after reconnection has occurred, the WebSphere MQ classes for JMS incorrectly opens the queue specifying the wrong queue manager name. Although this method call works, it leads to issues when the application then tries to use that temporary queue. Local fix No Local Fix Problem summary **************************************************************** USERS AFFECTED: This issue affects users of: - The WebSphere MQ V7.1 classes for JMS - The WebSphere MQ V7.5 classes for JMS - The WebSphere MQ V8 classes for JMS who have JMS applications that use JMS Connection Factory which has the following properties set: CLIENTRECONNECTOPTIONS : ANY CONNECTIONNAMELIST : a list of hostnames and ports> QMANAGER : "" and make use of automatic client reconnection. Platforms affected: MultiPlatform *******************
RSS Feed http://www.mqseries.net/phpBB/viewtopic.php?t=11063&sid=32083b22962f4e559a2b0a4c52a51c9c - WebSphere MQ Support RSS Feed - Message Broker Support
MQSeries.net Forum Index » General Discussion » Reason code 2045 : help needed Reason code 2045 : help needed « View previous topic :: View next topic » Author Message Vishy Posted: Thu Oct 02, 2003 11:40 am Post subject: Reason code 2045 : help needed NoviceJoined: 30 Jul 2003Posts: 21 In my code I am specifying the open options on the Q as mq error follows int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT; It works fine, if I use SYSTEM.DEFAULT.LOCAL.QUEUE, but once I change it to Queue name specified for development environment, I get the following error ""Completion code 2 Reason code 2045"" Please note that I am using the Q to just put the message on the Q, I am not expecting back any reply. In the error codes explanation, it says the reason is mqje001: completion code one of the following MQRC_OPTION_NOT_VALID_FOR_TYPE An option that is inappropriate for the object type (for example, MQOO_OUTPUT for an MQOT_PROCESS object). An option that is unsupported for the queue type (for example, MQOO_INQUIRE for a remote queue that has no local definition). One or more of the following options: MQOO_INPUT_AS_Q_DEF public static int sendMessage(String m_msg,String hn, String ch,int pt,String qManager, String mqQName) throws MQException,Exception{ MQQueueManager qMgr = null; byte[] message_Id = null; String msgData = null; MQQueue system_default_local_queue = null; try{ MQEnvironment.channel = ch; MQEnvironment.hostname = hn; MQEnvironment.port = pt; // Create a connection to QManager qMgr = new MQQueueManager(qManager); // Set up the options on the Q we wish to open int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT; // Now specify the Q that we wish to open and the open options system_default_local_queue = qMgr.accessQueue(mqQName, openOptions); // Define a simple message MQMessage mqMsg = new MQMessage(); mqMsg.format = MQC.MQFMT_STRING; mqMsg.priority = MQC.MQPRI_PRIORITY_AS_Q_DEF; mqMsg.expiry = 1200; mqMsg.writeString(m_msg); MQPutMessageOptions mqPMO = new MQPutMessageOptions(); // Put the message on the Q system_default_local_queue.put(mqMsg,mqPMO); rset3 = stmt1.executeQuery ("UPDATE NXT_PSFT_XML_DOCUMENTS SET PROCESSED_FLAG='Y' WHERE PROCESSED_ID =" +m_processed_id); message_Id = mqMsg.messageId; System.out.println("The message Id is" + mqMsg.messageId ); // Close the Q system_default_local_queue.close(); // Disconnect from QueueManager qMgr.disconnect(); return 0; } catch (MQException ex) { System.