Monday, March 30, 2015

#387 StreamExplorer --> Source - JMS / Target - JMS

Introduction

In this blog post I detail the setup/creation of a JMS Stream.
I will create a JMS client that writes credit card TXs to a Queue.
This queue will then be the source for my Stream -










JMS Queue Setup

I need to create the queue and the connection factory via the WLS console.







JMS Client

This is a simple Java JMS client that creates a Map Message to log a credit card transaction.
The input fields are –
  • ccNr – credit card number
  • cardholder
  • merNr – merchant number
  • merCountry – merchant country
  • txAmt – transaction amount.

Note how these map to the message –


















The full JMS client code is available here

Test the JMS Client


 










I have exposed the JMS client as a web service and then called
it from a SOA Composite.







This is essentially a BPEL process that calls the JMS client n times.
















The JDev App containing the JMS Client and the SOA project is available here

Now I have 10 messages in the queue.

Create the Stream Explorer artifacts

First I create the Stream -



 Specify the connect info.
















Now manually define the shape of the message being received -



















Now define the Exploration -















Execute the composite to ensure you have JMS messages.
Then check the Live Output Stream for the transactions -















Create the JMS Target Queue via the WLS console


Here I create a queue called CCTXOutQueue























I now add a target to the Exploration.


















Publish the Exploration -











Test again - I execute the composite specifying 10 transactions -

I monitor the out Q -

















No comments:

Post a Comment