Trouble reading msg frm the local Queue - Websphere

This is a discussion on Trouble reading msg frm the local Queue - Websphere ; Hi, I am currently working on an MQ based development.The front end code earlier used to write to a socket,from where the host end used to read the msg.But now i have implemented logic by which the front end(in java) ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Trouble reading msg frm the local Queue

  1. Trouble reading msg frm the local Queue

    Hi,
    I am currently working on an MQ based development.The front end code earlier used to write to a socket,from where the host end used to read the msg.But now i have implemented logic by which the front end(in java) write the message into a windows MQ remote Queue.This message reaches the host end through the TCP channel and finnaly into the local Q on the host end(linux).It works properly,writes the message into the local Q located on the host end,but from the host end i am unable to read this message.The MQ read function doesn't throw any sort of error,but goes into a loop trying to pick the message.I doubt there is some problem in the way or the options that i use to write the message into the windows Q .Would be nice if someone could help me on this . and i am also new with java ... I have attached the write code too ...

    Thnx in advance...

  2. Re: Trouble reading msg frm the local Queue

    Maybe you are inadvertently constraining the read function to get particular messages from the queue, eg. by matching correlation id, message id, or using a selector, and a matching message never arrives.

  3. Re: Trouble reading msg frm the local Queue

    Hi Glenns_Screen,
    First of all thnx for the reply.
    Well according to wat u say here ,i did a recheck on the parameters being passed to the MQ Read utility.It seems that my code gets stuck wen the MQGET() code gets called.It does not return from it.and since i donot have access to the defenition of this func MQGET(),i just dont know wats goin wrong in there.
    There is one other thing that i need 2 clarify.In the front end java code,
    I first set the options on the queue which i wish to open int openOptions = MQConstants.MQOO_OUTPUT;
    Now i specify the queue that we wish to open and the open options
    Then i create a simple MQ message and write some text in UTF8 format
    Then i convert my buffer string to string
    msg.writeUTF(mq_str);
    Then i specify the default put message options
    MQPutMessageOptions pmo = new MQPutMessageOptions();
    And then put the message to the queue
    queue.put(msg, pmo);
    and finally Close the queue
    queue.close();


    am i doin something wrong here.i mean i doubt WriteUTF()isnt reqd,coz it converts the message in2 some other format.

    Please help...

    Thnx in advance .....

  4. Re: Trouble reading msg frm the local Queue

    There is one other thing that i need 2 clarify.

    Confirm by some other method (eg. MQExplorer, amqsbcg) that the message actually made it on to the queue.

+ Reply to Thread