Wildfly 10 JMS message content

2019-06-25 08:33发布

问题:

I have an application that is using multiple JMS Queues. Problem with the application is that it is almost not creating any logs. I would like to avoid stopping the application, updating the sources and starting it once more (however, if there will be no another way to do this, I will be forced to do that). Application is running on remote server, so remote debugging is just pain because of amount of the messages.

I was thinking, if is there a way to see the content of the messages on the queue without interrupting the application flow. So far, I was trying to use jboss-cli to do that. First of all, I paused the queue processing with command:

/subsystem=messaging-activemq/server=default/jms-queue=myQueues.input:pause

After that, I have obtained the content of the queue with:

/subsystem=messaging-activemq/server=default/jms-queue=myQueues.input:list-messages

Got the following output:

{
"outcome" => "success",
"result" => [{
    "JMSPriority" => 3,
    "JMSMessageID" => "ID:d50aef44-edcc-441c-818c-7d97200926cf",
    "someOfMyKeys" => "someOfMyValues",
    "JMSExpiration" => 1487255104511L,
    "__AMQ_CID" => "ecdec0e2-b7c1-4d2e-b55b-317c38023b1b",
    "JMSTimestamp" => 1487255094511L,
    "JMSDeliveryMode" => "NON_PERSISTENT"
}]

}

After all, I have resumed the queue:

/subsystem=messaging-activemq/server=default/jms-queue=myQueues.input:resume

Nevertheless, this is not returning the actual content of the message. It will be enough if I could get the content in byte format (similar to the tcpdump output).

Is there a way to achieve it, or I have to use methods that I have mentioned previously (remote debug/app source change)?