activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: help need in configuring scenario
Date Mon, 10 Nov 2008 16:15:02 GMT
On Thu, Nov 6, 2008 at 11:41 PM, manish_goyal
<manishkumar_goyal@infosys.com> wrote:
>
> Hi,
>
> I have a scenario in which I have a JAVA Application. JAVA application
> create a object and send that object to ActiveMQ JMS queue. Now from JMS
> queue, using log4j.xml file i need to extract the data from the object and
> send that data to file.
>
> Program flow:-
>
> JAVA Application ---> ActiveMQ JMS ---> File

I suggest using Apache Camel for this scenario:

http://activemq.apache.org/camel/

If your Java appliation sends a message to a destination in ActiveMQ,
Camel can easily move that message from the destination into a file.
This can even be achieved right in the ActiveMQ XML configuration
file. Just search for the camelContext element and add the following
route there:

        <route>
            <from uri="activemq:example.A"/>
            <to uri="file:///Users/bsnyder/camel-test.txt"/>
        </route>

This route will cause any messages sent to the example.A queue to be
persisted to the file located in the /Users/bsnyder/camel-test/
directory. Also note that there are many configuration options
available on the file component:

http://activemq.apache.org/camel/file.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Mime
View raw message