IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Java service for UM message queue peeking has stopped working

  • 1.  Java service for UM message queue peeking has stopped working

    Posted Wed August 22, 2018 07:49 AM

    Hi!

    I’ve put together two custom java service on my Integration Server (version 9.12) that basically follows the sample code provided in the Universal Messaging Developer Guide for Queue browsing / peeking. These services initially worked fine when both doing a count of messages in the queue matching a provided selector string (e.g. a customerId or similar) and also fetching the publish time of the first message in the queue. At some point in time both these services have stopped working. No exception is thrown and no events are found even though there are messages on the queue.

    The following line of code is expected to find the events: nConsumeEvent evts = reader.peek(ctx); (as per documentation).

    I have tried to remove the message selector part of the of the nQueuePeekContext constructor, but I’m stil not able to find any messages on the queue.

    Any ideas on what could be causing this issue?

    Regards,
    Håkan


    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker


  • 2.  RE: Java service for UM message queue peeking has stopped working

    Posted Wed August 22, 2018 08:18 AM

    Hi Hakan,
    Can you tell me what fix level your IS and UM 9.12 are at?
    Thanks, Jane.


    #Universal-Messaging-Broker
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Java service for UM message queue peeking has stopped working

    Posted Wed August 22, 2018 08:52 AM

    Thanks for a quick response.
    It looks like the following fixes are applied.

    IS:
    IS_9.12_Core_Fix8
    TNS_9.12_Fix4
    IS_9.12_SPM_Fix2

    UM:
    Java Client 9.12 Fix 7
    JavaScript Client 9.12 Fix 3
    C++ Client 9.12 Fix 6 (LNXAMD64)
    Enterprise Manager 9.12 Fix 7
    Realm Server 9.12 Fix 7
    Migration Utility 9.12 Fix 1
    Template Applications 9.12 Fix 7 (LNXAMD64)


    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Java service for UM message queue peeking has stopped working

    Posted Thu August 23, 2018 06:47 AM

    Update: A related thing is that the snoop functionality within Enterprise Manager has also stopped working for the specifiq queue that I’m working with. I don’t know if this is related to the same root cause in this case, but other queues can be snooped. I can’t find any obvious issues in EM with e.g. massive amounts of sessions (that could have been created from the service).


    #Universal-Messaging-Broker
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Java service for UM message queue peeking has stopped working

    Posted Thu August 23, 2018 07:00 AM

    Hi,

    This seems unusual. How are you verifying that there are events on the channel? Are you aware of any change which may have been correlated with when the behaviour changed?

    Regards,

    Stuart


    #webMethods
    #Integration-Server-and-ESB
    #Universal-Messaging-Broker


  • 6.  RE: Java service for UM message queue peeking has stopped working

    Posted Thu August 23, 2018 08:06 AM

    Hi Stuart!

    Yes there are messages on the queue. I can verify that both via EM or by running a simple java service (not using peeking functionality, but rater getting queue details):

    nSessionAttributes nsa = new nSessionAttributes([realm connection details]);
    mySession=nSessionFactory.create(nsa);
    mySession.init();
    nChannelAttributes cattrib = new nChannelAttributes();
    cattrib.setName([queue path]);
    nQueue myQueue=mySession.findQueue(cattrib);
    nQueueDetails nqd = myQueue.getDetails();
    count=nqd.getNoOfEvents();

    So this problem seems to be specific to the peeking/browsing part of the UM API.


    #webMethods
    #Universal-Messaging-Broker
    #Integration-Server-and-ESB


  • 7.  RE: Java service for UM message queue peeking has stopped working

    Posted Thu August 23, 2018 08:54 AM

    Hi Håkan,

    That’s strange. Support should be able to investigate this. It may be helpful if you are in a position to send the queue’s .mem file. This would probably be required to reproduce the issue since a queue getting into this state seems very unusual.

    Has the behaviour persisted over server restarts?

    Stuart


    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker


  • 8.  RE: Java service for UM message queue peeking has stopped working

    Posted Thu August 23, 2018 09:16 AM

    Hi!

    We have restarted both IS and UM to see if that would help, but that problem remains. So we will probably need to involve the support team in order to get any further with this.

    //Håkan


    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: Java service for UM message queue peeking has stopped working

    Posted Mon August 27, 2018 02:11 PM

    If you have the .mem files backup for the queue, you can try restoring them and restart UMS. If not, recreate the queue. I have noticed issues with the .mem files when there is no free disk space on UMS installed server.


    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker


  • 10.  RE: Java service for UM message queue peeking has stopped working

    Posted Tue August 28, 2018 04:24 AM

    Hi!

    Just a bit of an update regarding this topic in order to provide details for future readers.

    We decided to not pursue any support help in order to resolve this issue with the unresponsive queue - explicitly related to queue browsing/peeking. The queue was instead recreated which resolved the problem. We might however have found a potential causes. When digging into the java documentation I found that the valid input for the following call: nQueueReader.createContext(int, String), must provide a positive integer value. When building the initial versions of the java service I would test the service using the input ‘-1’. The service still worked with this input (at least for a while) but might be a reason as I don’t know what could happened when peeking the queue with the infinite window size.

    Thanks for all the input on this topic!
    Regards,
    Håkan


    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker


  • 11.  RE: Java service for UM message queue peeking has stopped working

    Posted Tue August 28, 2018 05:54 PM

    Thank for the update and it is indeed very helpful for the future readers!!

    Cheers!
    RMG


    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #webMethods