-
1. Re: How does JBoss 7 check jms message in database?
jbertram Dec 19, 2012 8:56 PM (in response to ohmygod)JBoss AS7 uses HornetQ as its JMS implementation. HornetQ doesn't store messages in a database, it uses a journal on local disk. You can use the CLI to check statistics on JMS destinations.
-
2. Re: How does JBoss 7 check jms message in database?
ohmygod Dec 19, 2012 8:59 PM (in response to jbertram)Thanks. Can you show me more detailedly how to check the data in the journal on the disk? and where is the journal saved on disk?
-
3. Re: How does JBoss 7 check jms message in database?
jbertram Dec 19, 2012 9:08 PM (in response to ohmygod)The HornetQ journal is stored in the data directory by default in the messaging* directories. It uses a binary format and there are no external tools for you to "query" it like you would a database.
If, for example, you want to get the message count for the "testQueue" then connect with the CLI and execute these commands:
cd subsystem=messaging/hornetq-server=default/jms-queue=testQueue read-attribute message-count
-
4. Re: How does JBoss 7 check jms message in database?
ohmygod Dec 19, 2012 9:10 PM (in response to jbertram)I donot see hornetq folder under data, but see messagingbindings, messagingjournal and messaginglargemessages folders. Are they the data folders?
And how to connect with the CLI? can you explain a little more?
-
5. Re: How does JBoss 7 check jms message in database?
jbertram Dec 19, 2012 9:14 PM (in response to ohmygod)Re-read my last message. I edited it after I posted it initially.
As far as the CLI goes check the documentation please - https://docs.jboss.org/author/display/AS72/Admin+Guide#AdminGuide-CommandLineInterface.
-
6. Re: How does JBoss 7 check jms message in database?
ohmygod Dec 20, 2012 1:15 AM (in response to jbertram)I have connected with CLI, but how to query jms stuff? Are there any commands that can be used for this purpose?
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands. [disconnected /] connect [standalone@localhost:9999 /]
-
7. Re: How does JBoss 7 check jms message in database?
nickarls Dec 20, 2012 3:06 AM (in response to ohmygod)[standalone@localhost:9999 /] /subsystem=messaging/hornetq-server=default/jms-queue=testQueue:read-attribute(name="message-count")
{
"outcome" => "success",
"result" => 0L
}
-
8. Re: How does JBoss 7 check jms message in database?
ohmygod Dec 20, 2012 3:13 AM (in response to nickarls)It works, thanks a lot. Are there other name attributes that I can use to query?
-
9. Re: How does JBoss 7 check jms message in database?
nickarls Dec 20, 2012 3:19 AM (in response to ohmygod)Try starting jboss-cli -c --gui and browse around
-
10. Re: How does JBoss 7 check jms message in database?
ohmygod Dec 20, 2012 4:09 AM (in response to nickarls)I tried this but under extension=org.jboss.as.messaging, there are not much stuff. I also cannot find any name called "message-count" to query.
How to do with this..?
-
11. Re: How does JBoss 7 check jms message in database?
nickarls Dec 20, 2012 4:16 AM (in response to ohmygod)what does (non-gui)
/subsystem=messaging/hornetq-server=default/jms-queue=testQueue:read-resource(include-runtime="true", include-defaults="true") give?
-
12. Re: How does JBoss 7 check jms message in database?
ohmygod Dec 20, 2012 5:15 AM (in response to nickarls){
"outcome" => "success",
"result" => {
"consumer-count" => 0,
"dead-letter-address" => "jms.queue.DLQ",
"delivering-count" => 0,
"durable" => true,
"entries" => [
"queue/test",
"java:jboss/exported/jms/queue/test"
],
"expiry-address" => "jms.queue.ExpiryQueue",
"message-count" => 0L,
"messages-added" => 0L,
"paused" => false,
"queue-address" => "jms.queue.testQueue",
"scheduled-count" => 0L,
"selector" => undefined,
"temporary" => false
}
}
-
13. Re: How does JBoss 7 check jms message in database?
ohmygod Dec 20, 2012 5:25 AM (in response to ohmygod)There is apparently jms message proceeding in my system, but I used that command and saw no any infomation associated with such MDB besides the information above.
How to check the information related to my custom MDB in my own system?
-
14. Re: How does JBoss 7 check jms message in database?
nickarls Dec 20, 2012 5:48 AM (in response to ohmygod)You would have to read your own queue in "jms-queue=testQueue"