Transforming JMS messages after receiving them...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   A_J
Posted On:   Thursday, October 27, 2005 03:57 PM

I am developing a JMS application using the Unified Domain as specified in JMS 1.1. My producer sends messages in the form of XML. While Starting the consumer, I give it a ConsumerConfiguration.xml file as parameter so that the consumer can transform incoming messages and process them according to the configuration in the XML file. For example I want to have different plugins such as XSLT, File System Plugin etc which will do different things to the XML message that my consumer receives. What my consumer should do with the incoming message is defined by the XML configuration file. Here I have a plugin called FileSystemPlugin so the consumer should persist this message in the file system. Another plugin could say XSLT plugin so I will transform that document using s   More>>

I am developing a JMS application using the Unified Domain as specified in JMS 1.1. My producer sends messages in the form of XML. While Starting the consumer, I give it a ConsumerConfiguration.xml file as parameter so that the consumer can transform incoming messages and process them according to the configuration in the XML file. For example I want to have different plugins such as XSLT, File System Plugin etc which will do different things to the XML message that my consumer receives. What my consumer should do with the incoming message is defined by the XML configuration file. Here I have a plugin called FileSystemPlugin so the consumer should persist this message in the file system. Another plugin could say XSLT plugin so I will transform that document using some XSLT code. This is because I want to process different messages differently based on their source.
Here is a sample Consumer Configuration File.




ConsumerName
SomeTopic
Provider
SomeDestination


FileSystemPlugin
com.aj.jms.plugins.FileSystemPlugin


SomeParameter
SomeParamaterValue






When I start my consumer, it is ready with the plugin to apply to messages. Now the message listener for this consumer should invoke the plugin for this consumer each time it receives some message.

I am confused with the design of classes, initiating the plugin and invoking the plugin. If anybody could help in design, i would be really appreciative.

Thanks

aj

   <<Less
About | Sitemap | Contact