Service Virtualization

  • 1.  Help Understanding JMS Proxy Recording Process

    Posted Apr 08, 2016 11:09 AM

    I'm trying to setup a simple example of how to do a proxy recording of a JMS application.

    I'm using Apache ActiveMQ as my messaging platform.

     


    I've already setup a simple scenario where ::

    1. the client will put request messages onto a "fromClientQueue"
    2. the server will pull request message off of the "fromClientQueue"
    3. the server will put response messages onto a "toClientQueue"
    4. the client will pull response messages off of the "toClientQueue"

     


     

    So now I'm trying to understand what I have to do in order to record this traffic.

     


     

    According to this doc, it seems that I need to ::

    1. setup 2 additional queues in ActiveMQ ("fromClientQueue_proxy" and "toClientQueue_proxy")
    2. point my client at the "fromClientQueue_proxy"
    3. somehow config the "fromClientQueue_proxy" to point at the recorder
    4. config the recorder to point at the "fromClientQueue"
    5. the server will pull off the request and push out the response as normal
    6. somehow config the "toClientQueue" to point at the recorder
    7. config the recorder to point at the "toClientQueue_proxy"
    8. point my client at the "toClientQueue_proxy"

     


     

    Do I understand this concept correctly? 

    If so, then I'll have to figure out how to setup Proxy queues in ActiveMQ and redirect their output, but I want to make sure that my basic understanding of the recording process is correct before I even start messing with the proxy setup/config.

     

    Thanks,

    Jeff



  • 2.  Re: Help Understanding JMS Proxy Recording Process
    Best Answer

    Posted Apr 08, 2016 12:08 PM

    Kevin can provide the definitive answer. 

    But, it appears you have the basic idea.  In Step 3, Somehow Config the "fromClientQueue_proxy" to point at the recorder.  When you set up your recorder, point the recorder's Proxy Request queue to the "fromClientQueue_proxy",  Step 4, points the Recorder's Live Request to the "fromClientQueue".   Do the inverse on the Response side. 

    Step 5, Recorder's Live Response queue points to "toClientQueue" and Step 7, the recorder's Proxy Response points to "toClientQueue_proxy".

    Your client will write into and read from the proxy queues.

    Here's a sample view of the queue names.  Disregard the other settings in the picture as yours may or may not be different -- just wanted you to see how the recorder potentially looks.  (this is a snapshot from DevTest 9.1)

    fromClientQueue.JPG



  • 3.  Re: Help Understanding JMS Proxy Recording Process

    Posted Apr 08, 2016 12:42 PM

    Thanks Joel!  That's all correct.

     

    > If so, then I'll have to figure out how to setup Proxy queues in ActiveMQ and redirect their output,

     

    Creating queues in ActiveMQ is usually pretty easy, and typically doesn't require any "administrative" configuration at all.  If you're using JNDI (the 'JMS JNDI Queue' asset in DevTest) then using the prefix 'dynamicQueues/<queue name>' will create a queue with that name on the fly.  If you're not using JNDI (the 'JMS Queue' asset in DevTest) then it's even easier; just give it a name and ActiveMQ will create the queue on the fly.

     

    I'm not sure what you mean about 'redirect their output'.  You just have to "create" the proxy queues and point your client and the VSE recorder at them like Joel showed above.  There's nothing fancy here.