Wildfly 10 JMS message content

半腔热情 提交于 2019-12-12 12:14:57

问题


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)?

来源:https://stackoverflow.com/questions/42276792/wildfly-10-jms-message-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!