Retrieving messages from MQ Series

Hi,
We have the situation where we need to receive messages from our partner, who only can use MQ Series to send them. So we are looking into ways how to solve it on our end, which is on a Unix server. We will only read messages, and the other side will be a black box for us which will provide us with settings to connect to their manager.
Do we need to install a client software (which IBM seems to provide for free) and on top of that use a Java API? Or do we use JMS on top of the client?
Or if we use JMS, isn't the client needed?
Thanks

Hi
I am trying to read messages from the MQ using the following code.
The queue used by this program is shared, msg is pushed other program and this progam fetch the msg and save it physically.
I m facing a problem, say there are 15 messages, then 15 files should be created, some time it creates 15 files one for each message, while some times it creates less then 15 files.
String messageType = null;
          String docId = null;
          String idocData = null;
          String fileName = null;
          String msgId = null;
          try {
               // Create a queue manager object and access the queue
     // that will be used for getting the messages.
               qMgr = new MQQueueManager(qManager, env);
               //int openOptions = MQC.MQOO_INPUT_EXCLUSIVE | MQC.MQOO_BROWSE | MQC.MQOO_INQUIRE;
               int openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_BROWSE | MQC.MQOO_INQUIRE | MQC.MQOO_FAIL_IF_QUIESCING;
               queue = qMgr.accessQueue(qName, openOptions, null, null, null);
               MQGetMessageOptions gmo = new MQGetMessageOptions();
               // Get the count of messages present into Queue.
               int messageCnt = queue.getCurrentDepth();
               _logger.info("Current Depth of MQ is : "+ messageCnt);
               if (messageCnt > cnt && cnt != 0) {
                    messageCnt = cnt;
               // If count is greater than Zero then get the message from Queue
               // and creates the file under the target folder.               
               if (messageCnt > 0) {
                    for (int i = 0; i < messageCnt; i++) {
                         _logger.info("Depth of MQ Before reading : "+ queue.getCurrentDepth());
                         messageType = "";
                         docId = "";
                         idocData = "";
                         fileName = "";
                         msgId = "";
                         MQMessage message = new MQMessage();
                         queue.get(message, gmo);
                         byte[] data = new byte[message.getMessageLength()];
                         String msg = null;
                         message.readFully(data);
                         _logger.info("Getting File  : "+ (i+1));
                         try {
                              msg = new String(data);
                              messageType = msg.substring(147, 177).trim();
                              docId = msg.substring(121, 137).trim();
                              idocData = msg.substring(108, msg.length());                              
                              msgId = String.valueOf(System.currentTimeMillis());
                              // Getting inbox folder path                              
                              if (messageType.trim().equalsIgnoreCase("INVOIC01")) {
                                   targetFolder = BOCConfig.getProperty("invoice.inbox.folder");
                              } else if (messageType.trim().equalsIgnoreCase("DELVRY03")) {
                                   targetFolder = BOCConfig.getProperty("asn.inbox.folder");
                              fileName = createFile(idocData, msgId, messageType, targetFolder);                              
                              _logger.info("File Created no " + (i+1) +" with msgId " + msgId + " messageType " + messageType + " DocId " +docId);                              
                              _logger.info("Depth of MQ After reading : "+ queue.getCurrentDepth());
                         } catch (NullPointerException ne) {
                              String strMsg = "Edgeware got junk or null message from MQ which is not proceed by MQ Adapter.";
                              fileName = createFile(idocData, msgId, messageType, failedFolder);
                              raiseAlert(strMsg, messageType, docId, fileName, ne.getMessage());                              
                         } catch (StringIndexOutOfBoundsException siobe) {
                              String strMsg = "Edgeware got invalid message from MQ which is not handled by MQ Adapter.";
                              fileName = createFile(idocData, msgId, messageType, failedFolder);
                              raiseAlert(strMsg, messageType, docId, fileName, siobe.getMessage());                         
                         } catch (Exception e) {
                              String strMsg = "Edgeware got error while creating idoc file or DB transction";
                              fileName = createFile(idocData, msgId, messageType, failedFolder);
                              raiseAlert(strMsg, messageType, docId, fileName, e.getMessage());
               // closing the queue.
               queue.close();
          } catch (MQException ex) {
               String strMsg = "Edgeware got MQ Error while connecting/retrieving message from Queue";
               String err = "MQ exception: CC = " + ex.completionCode + " RC = " + ex.reasonCode;               
               raiseAlert(strMsg, messageType, docId, failedFolder, err);
          } catch (IOException e) {
               String strMsg = "Edgeware got MQ Error while reading message from the Queue";               
               raiseAlert(strMsg, messageType, docId, failedFolder, e.getMessage());               
          }catch (Throwable th) {
               String strMsg = "Edgeware got Runtime Exception";               
               raiseAlert(strMsg, messageType, docId, failedFolder, th.getMessage());               
          }

Similar Messages

  • Can I retrieve messages from a blackberry email address in Mail for OS X?

    I'm wondering if I can configure Mac OS X Mail to retrieve messages from a blackberry email address.
    Thanks.

    lte me know if my question doesn't make sense.

  • ** List of RFCs to retrieve messages from SXMB_MONI

    Hi friends,
    I found only one RFC 'SXMB_SELECT_MESSAGES'  to retrieve messages from SXMB_MONI. But, this RFC returns only message id.
    Could you kindly tell RFCs or classes other than this which will be usefull to retrieve XML Payload and other things ?
    Kind Regards,
    Jeg P.

    Hi,
    There is a function module SXMB_GET_MESSAGE_LIST through which you can get the messages in SXMB_MONI.
    Refer the below thread for more detail:
    In Which Database Table the Messages are Stored in XI
    Thnx
    Chirag
    Edited by: Chirag Gohil on Feb 15, 2008 6:13 PM

  • Mail has stopped retrieving messages from Yahoo

    Mail has stopped retrieving messages from Yahoo email account.  I deleted the account, cleared Safari history and recreated the account.  Successfully retrieved all folders and contents of folders but no messages.  Watching the Activity, it appeared to be retrieving the messages but none appear.  Looking at the log, I can see FETCH error server.  Not sure where to go from here to resolve the issue.  Thanks for your help.

    Based on what I've read in the forum, Yahoo mail has been having some problems.
    Mail troubleshooting - Yosemite
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages
    SMTP servers keep going offline

  • Having transferred songs from my old mac to my new Macbook I cannot authorise them because my old Apple ID is an obsolete email account. I cannot retrieve messages from it so cannot change password.

    Having transferred songs from my old mac to my new Macbook I cannot authorise them because my old Apple ID is an obsolete email account. I cannot retrieve messages from the email account it so cannot recieve a password change notification. The answers I give to security question is rejected. Help!

    Contact iTunes Customer Service and request assistance with your issue...
    Apple  Support  iTunes Store  Contact Us

  • Mail won't retrieve messages from my primary Comcast account

    Apple Mail, Version 2.1 (752/752.2), downloads emails from my yahoo.com and gmail.com accounts, but it has suddenly stopped downloading emails from my primary Comcast account to my G5 iMac. I get no error messages.
    Trying to retrieve email in Apple Mail can sometimes cause the Comcast email server to classify all unread messages as read. If Mail is set to "remove copy from server right away after retrieving a message," then all of my new messages are deleted from the Comcast server before I ever see them, even though they have not been retrieved.
    Curiously, the only emails that Mail can access from my primary Comcast account are those that have been automatically forwarded from my secondary Comcast accounts. (Just out of curiosity, I tried manually forwarding a message from my primary account to my primary account; it could not be retrieved by Mail.)
    My wife and daughter, on the same hard-wired ethernet LAN, have no problem accessing their primary Comcast email accounts with Mail on their Macs (MacBook and G4 iMac). Our settings for Comcast accounts seem to be identical on all three computers.
    Perhaps coincidentally, I also have Comcast Digital Voice VoIP telephone service, and this email problem started while Comcast was troubleshooting problems with my voicemail. I use separate cable modems for phone (Arris TM402P) and Internet (Motorola SB5100).
    I've tried: 1) rebuilding all of the mailboxes in my Mail Inbox; 2) deleting all of my emails on the Comcast server and emptying the trash; 3) setting the outgoing SMTP mail server on all of my email accounts to Comcast; 4) repairing permissions and running maintenance scripts; 5) shutting down the computer overnight; 6) Comcast support -- they try, but then give up and say that they don't support Apple Mail.
    I'd appreciate any assistance.
    iMac G5 1.9GHz   Mac OS X (10.4.7)   1 GB RAM

    This problem was apparently caused by one of two things: 1) trying to use Mail with an AIM.com IMAP account; or 2) corruption somewhere in my Rules and Mailboxes.
    I had to rebuild my POP accounts from the ground up. First, I backed up Mail preferences and messages. After quitting Mail and deleting the preference file com.apple.mail.plist and the Mail folder from Users/Home/Library, I launched Mail and created new accounts and new rules.
    Prior to this issue, I had been using Apple Mail for three years to retrieve POP mail from Comcast and other accounts. This was my first experience with IMAP.
    iMac G5 1.9GHz   Mac OS X (10.4.7)  

  • Mail won't retrieve messages from ISP

    Please tell me this is my ISP's problem, not my iMac's! I have 2 email accounts, one with my ISP and another with a spam-filtering service. As of yesterday, Mail no longer retrieves messages sent to my ISP email address, although it does retrieve from the other account. I know I have messages, because I can log in to webmail and read them there--but what a pain. My ISP, a small local outfit, seems overwhelmed, and I can't get through to support--so I'm guessing this is their problem.
    If not, any suggestions! Many thanks!

    Anything in the Deleted Messages box?
    First Quit Mail, then I'd backup these two Mail folders, by right clicking on them in the Finder, then choose Archive/Compress.
    Users/YourUserName/Library/Mail
    Users/YourUserName/Library/Mail Downloads
    (Could be a different folder here if you chose such in Mail Prefs)
    Right click on that Mail folder, choose archive, you'll get everything in the folder, and the folder itself in a file called Mail.zip, move it to a safe place, same for the Mail Downloads folder... only the plist is separate.
    /Users/YourUserName/Library/Preferences/com.apple.mail.plist
    I'd get EasyFind...
    http://www.macupdate.com/info.php/id/11076
    http://www.versiontracker.com/dyn/moreinfo/macosx/8707
    Search your whole drive for...
    .emlx
    Case Insensitive, Show Hidden, how many do we find? Sort by Date, when are the first & last?

  • Retrieving messages from iPhone

    Hi I have two iPhones on one account can I retrieve messages that have been deleated?

    Only from an iPhone backup that contains the messages you're trying to recover. Otherwise, they are gone.

  • Retrieving messages from land line

    hi! does anyone know how to retrieve messages on the new iphone from your land line so you don't eat up your cel minutes?

    I believe your question is to dial your voicemail system from your landline.  If this is right, you can do so by calling you 10-digit mobile number from the landline (basically call yourself). Don't answer, and when the voicemail recording comes on, press #.  You will then be prompted to enter your voicemail password. Go ahead and do so, and press # again.  Once you do this, you will be able to control your voicemail from any phone including your landline. 
    Format: Call yourself> # Voicemail Password# 
    I hope that answers your question. Let us know if you have any others. 

  • How to Retrieve Messages from Function Module 'CM_F_MESSAGE'

    I have a custom program that first calls function module CM_F_INITIALIZE to make sure that pop-ups are not displayed on screen. This program then performs a subroutine that also calls function CM_F_MESSAGE. How do I retrieve the messages so I can output it as 1 big list on screen?
    Thanks in advance!

    The subroutine calls the function CM_F_MESSAGE to display message.
    you can declare one internal table in your program and populate the message details in this internal table.
    At the end while displaying data, display the content of this internal table as messages populated during the process.

  • Retrieving messages from content copier file?

    Hi all,
    I backed up my N95 using Content Copier but when retoring all the info it keeps saying that errors occurred.
    Most things restored or could be worked around (e.g. contacts from Outlook sync) but it won't restore my text messages to my phone.
    Anyone any ideas how I might be able to get these from the file?
    Many thanks

    try noki in this thread to extract and explore the backup file of type .nbu/.nfb/.nfc/.nbu.
    What's the law of the jungle?

  • How do I retrieve messages from the cloud?

    When I click on the cloud button, I can see that I have 42 messages, but cannot figure out how to retrieve them. Any help would be greatly appreaciated.

        Hi Vzw-tempname,
    We know that retrieving your messages is important! What happens when you click on the Cloud icon? Does it aske to setup the cloud? Do you receive any error messages?
    Thanks,
    PamelaF_VZW
    Tweet us @vzwsupport

  • Configuring MDB to receive message from MQSeries Queues bound on WL JNDI

    Hi,
    I am using weblogic7.0 sp2. I need to configure my MDB to receive message from MQ Series (on a different server). The queue is bound to WL JNDI using a server startup program.
    Anyone with experiece, please help.
    Thanks,
    Fasih

    I'd start here:
    http://e-docs.bea.com/wls/docs70/faq/index.html
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • TS3899 In the past I have been able to retreive all messages not deleted in the inbox of my mailbox.  This week I have not been able to acces messages received prior to 9/10/13.  what can I do to retrieve messages eceived prior to 9/10/13.

    Until recently I have been able to retrieve all messages not deleted i m mailbox "inbox".  Today I can only retrieve messages from 9/10/13 to present.  How can i retreive all previously sent messages that were not deleted?

    Settings > Mail, Contacts, Calendars > Tap the account in question > Mail days to sync - increase the time to sync.

  • Duplicate messages from weeks ago

    Ever since upgrading to Leopard last month, Mail has been retrieving messages from one of my accounts that date back to weeks previous, which have already been retrieved. Every day I receive 5-20 "new messages" which I have already read. I saw this issue come up in a recent thread, but no one seems to have a solution. Any ideas?
    Thanks
    Atticus

    am not sure which threads you refer to, but the first thing i would suggest is for you to check the settings of your email account if it is pop, that is the settings with your email provider - are you set to download every email, or are you set to download from "today" forward, or only the emails not downloaded...
    let me know

Maybe you are looking for

  • Open and configure serial port

    Hi, when i use the function configured serial port, i can work with it. for which case i need the function open port. do i need both an in which order? thanks florian 

  • How to make a question pool with MANY questions?

    I would like to make a question pool with several thousand questions, which I currently have in an Excel file. Is there a way around having manually to enter all questions in a Captivate question pool? Thanks.

  • HDTV Question

    I plan on buying a new tv to mount on the wall...I'm a Sony fan, and have been for quite sometime when it comes to TV's, but my dilemma is this-how do you know what size is appropriate?  I want to be able to get the biggest size that will still be a

  • Problems connecting i-pod to computer

    I am having trouble connecting my i-pod to my computer, everytime I try it comes up with the following message 'USB Device Not Regonized'. I have gone through all the help sections and have reinstalled, restarted etc etc, but none of this has helped.

  • Contact Sheets in Bridge CC

    i have downloaded the output module for Bridge cc, now how do i create a contact sheet from this?