Author |
Message
|
aspa |
Posted: Mon Dec 31, 2007 5:54 am Post subject: JMS client tool for testing |
|
|
Newbie
Joined: 31 Dec 2007 Posts: 3
|
I'm developing MDBs that use JMS queues hosted on Websphere MQ.
For testing purposes I'd like to be able to manually add messages to the queue as well as inspect the queue contents etc.
I also need to be able to set custom header fields in the messages that are being sent. These fields will be used for selecting messages from the queue.
Are there any free tools that can be used for this?
I've quickly tested rfhutil and HermesJMS but I couldn't figure out how to set custom headers with those tools. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Dec 31, 2007 12:24 pm Post subject: Re: JMS client tool for testing |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
aspa wrote: |
I'm developing MDBs that use JMS queues hosted on Websphere MQ.
For testing purposes I'd like to be able to manually add messages to the queue as well as inspect the queue contents etc.
I also need to be able to set custom header fields in the messages that are being sent. These fields will be used for selecting messages from the queue.
Are there any free tools that can be used for this?
I've quickly tested rfhutil and HermesJMS but I couldn't figure out how to set custom headers with those tools. |
Define custom headers and custom header fields  _________________ MQ & Broker admin |
|
Back to top |
|
 |
aspa |
Posted: Mon Dec 31, 2007 12:48 pm Post subject: |
|
|
Newbie
Joined: 31 Dec 2007 Posts: 3
|
I'd like to be able to use a single queue for receiving "real" test messages without consuming them (will be manually studied and replayed) and also manually add test messages that would get consumed by my MDB.
I thought I'd accomplish this by defining a message selector for my MDB and make the manually added messages match the selector. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Dec 31, 2007 1:05 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Bad design....
An MDB should not use a selector as it will only slow process and give you problems...
(except may be last message in group) ...
Use instead multiple queues...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
aspa |
Posted: Tue Jan 01, 2008 6:22 am Post subject: |
|
|
Newbie
Joined: 31 Dec 2007 Posts: 3
|
I'll keep that in mind, thanks.
In this case, however, I was only going to use selectors during development. The queue I'm using is administered by the client's IT outsourcing partner which makes any change requests very difficult. For this reason I thought it would be easier to use a single queue with selectors. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 01, 2008 12:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
In that case you have multiple possibilities:
- Setting up an alias queue instead of the real on and have the messages go to whichever base queue you need
- stopping the MDB. Use MO71 or equivalent tool to copy messages to a file.
Those can then be replayed into any queue of your choosing. Restart the MDB...
- Stop the MDB. Use a tool like rfhutil/rfhutilc to browse and save which ever specific message you might have trouble with. Restart the MDB...
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
|