MQ

MQ

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.

 View Only
  • 1.  How to Enable Logging in MQ Client in Spring Boot Docker

    Posted Mon February 20, 2023 11:32 AM

    We have an application running SpringBoot connecting to an MQ Queue Manager. Recently we had some kind of event occur that resulted in significantly degraded performance. The MQ team did not see anything in the logs on the server. In our client we saw multiple instances of the following but no detailed information indicating why the client was having an issue.

    Rejecting received message because of the listener container having been stopped in the meantime:
    JMSMessage class: jms_bytes
    JMSType: null
    JMSDeliveryMode: 2
    JMSDeliveryDelay: 0
    JMSDeliveryTime: 0
    JMSExpiration: 0
    JMSPriority: 0
    JMSMessageID: ID:414d5120514d2e4b4c4f472e50524f44fc11ec63016ad623
    JMSTimestamp: 1676416112950
    JMSCorrelationID: ID:414d5120514d2e4b4c4f472e50524f44cb2420628ad4c628
    JMSDestination: topic://MY/PROD/TOPIC
    JMSReplyTo: null
    JMSRedelivered: true
    JMSXAppID: QM.PROD
    JMSXDeliveryCount: 2
    JMSXUserID: mqm
    JMS_IBM_Character_Set: ISO-8859-1
    JMS_IBM_Encoding: 546
    JMS_IBM_Format:
    JMS_IBM_MsgType: 8
    JMS_IBM_PutApplType: 26
    JMS_IBM_PutDate: 20230214
    JMS_IBM_PutTime: 23083295
    3c4e53313a536967526f757465207
    I was able to track this to the AbstractMessageListenerContainer class.
    What might have been helpful is to enable logging for IBM MQ client (9.1.0.5) but I could not find out how to get that working. Do you have anything you can point me to that will help me configure the IBM MQ client logging in the event his happens again?
    Looking for message log files won't help. The incident was causing the k8s container to be declared unhealthy and repeatedly killed. There is no persistent storage to save the log files to.


    ------------------------------
    Will Schneider
    ------------------------------


  • 2.  RE: How to Enable Logging in MQ Client in Spring Boot Docker

    Posted Mon February 20, 2023 01:59 PM

    Did you try according to the instructions in this doc?

    https://www.ibm.com/docs/en/ibm-mq/9.1?topic=ut-controlling-trace-in-running-process-by-using-mq-classes-java-mq-classes-jms



    ------------------------------
    Tim Zielke
    ------------------------------



  • 3.  RE: How to Enable Logging in MQ Client in Spring Boot Docker

    Posted Mon February 20, 2023 02:28 PM

    I did not but I would not have been very successful. The container was only active for ~45 seconds before kubernetes killed it due to instability and started a new one. I need something I can add to a ConfigMap that will be recognized by the IBM MQ client code.



    ------------------------------
    Will Schneider
    ------------------------------



  • 4.  RE: How to Enable Logging in MQ Client in Spring Boot Docker

    Posted Tue February 21, 2023 03:51 AM

    If you are using the mq-jms-spring-boot-starter then as documented in it's GitHub repository home - https://github.com/ibm-messaging/mq-jms-spring#logging--tracing

    "The package makes use of the logging capabilities within Spring. You can enable tracing of this specific component in your application's properties file by setting logging.level.com.ibm.mq.spring.boot=TRACE. Otherwise it uses the standard inheritance of logging configuration from logging.level.root downwards."



     



    ------------------------------
    Soheel Chughtai
    ------------------------------



  • 5.  RE: How to Enable Logging in MQ Client in Spring Boot Docker

    Posted Tue February 21, 2023 09:32 AM

    Also please note the JMSXRedeliveryCount of 2. Is K8s making the MDB ready before its dependencies (like a DB to put the message in)? And failing the health check because the DB is not available?



    ------------------------------
    Francois Brandelik
    ------------------------------