Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 33927 invoked from network); 6 Jul 2007 07:09:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jul 2007 07:09:33 -0000 Received: (qmail 81794 invoked by uid 500); 6 Jul 2007 07:02:53 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 81771 invoked by uid 500); 6 Jul 2007 07:02:52 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 81758 invoked by uid 99); 6 Jul 2007 07:02:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2007 00:02:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of james.strachan@gmail.com designates 66.249.82.225 as permitted sender) Received: from [66.249.82.225] (HELO wx-out-0506.google.com) (66.249.82.225) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2007 00:02:46 -0700 Received: by wx-out-0506.google.com with SMTP id i30so126858wxd for ; Fri, 06 Jul 2007 00:02:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PElrCN9+bA3gCcgSbrfJ9ojNem2o0gsaoyMbD4Q3QD1Gf5kojGHDFigGggOcppviGVIgxap4KmLlncllBEmowJHVF7zQP40lLhkLEK2OGuf7HnmRRPjmUyAotFHO9DlTntdKqtA0GN9O7qEQLUz4j1Hsnun6d0uIlDgKEXQuPtw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ViI1UMi+R605yKnmiJ7JkhflZJQ2bW1Lg/q9ZvxpLXs3A0CX/lbm+ph34oRRt0BQ2Wdw7zHqf9u9MDHNAuSDQpBD73MzS4qpUNE0TO1X6FIpadzP/GeQE0gyjNAV8gwiVMLN14QMesWcyyunvwevAlMywej2EOvuZSkZ8JTeoaI= Received: by 10.90.69.8 with SMTP id r8mr132309aga.1183705345873; Fri, 06 Jul 2007 00:02:25 -0700 (PDT) Received: by 10.90.63.14 with HTTP; Fri, 6 Jul 2007 00:02:25 -0700 (PDT) Message-ID: Date: Fri, 6 Jul 2007 08:02:25 +0100 From: "James Strachan" To: camel-user@activemq.apache.org Subject: Re: Appropriate use case for Camel? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org On 7/5/07, Paul Dlug wrote: > On 7/3/07, James Strachan wrote: > > On 7/3/07, Paul Dlug wrote: > > > On 7/3/07, James Strachan wrote: > > > > On 7/3/07, James Strachan wrote: > > > > > On 7/3/07, Paul Dlug wrote: > > > > > > Hopefully this is an easy answer. I'm a bit unclear on how Camel > > > > > > should actually be used. I'm currently using ActiveMQ to do some basic > > > > > > integration between applications in Java, Ruby, Perl, primarily via > > > > > > STOMP. I'd like to use Camel to apply some of the enterprise > > > > > > integration patterns, especially as it applies to routing as well as > > > > > > using some of the built in connectors. From a quick read through the > > > > > > docs it appears that I need to build Camel into an application itself > > > > > > (in a servlet container or via spring). Is it possible to just run > > > > > > Camel inside an ActiveMQ server to configure queues and handle routing > > > > > > and other patterns? > > > > > > > > > > Absolutely! Actually its on my list of things to do to provide some > > > > > examples of how to drop camel into the activemq.xml file. > > > > > > > > Actually it turned out to be way easier than I thought! > > > > > > > > http://cwiki.apache.org/ACTIVEMQ/enterprise-integration-patterns.html > > > > > > > > So you could just download tomorrows 5.0 snapshot and you're good to go... > > > > > > Thanks James! I've been building 5.0 from subversion anyway so I just > > > updated my local copy and I'll give this a shot. > > > > Great! Let us know how you get on & if there's anything we can do to > > make it easier to use Camel from inside the ActiveMQ broker > > Perhaps I'm still a bit unclear on how to use this, I specified the > following config: > > xmlns="http://activemq.apache.org/camel/schema/spring"> > > > > > > > Which as I understand it should take messages addressed to the queue > "a" and send them to "b". Unfortunately not; the "queue: " URI currently in Camel talks to an in-memory queue. There's a note here http://activemq.apache.org/camel/queue.html I'm thinking to avoid further confusion we should rename this component to be called "seda:" or something instead to avoid confusion. > This doesn't seem to actually work though, > I've tried changing the endpoints from "queue:a" to "activemq:a" but > that didn't seem to help. Any tips for a newbie? So I just tried it with the latest trunk. I uncommented the route thats in there & browsed the queue ("example.A) and it was created with a single consumer. Though when I sent a message to it I got a stack trace in the broker log with a ClassNotFoundException. It turned out that the binary distro should be copying the JTA jar from J2EE into the lib directory; but it wasn't. I've just fixed that, so it seems to be working for me. Incidentally I've changed trunk to enable the camel route by default to make it easier to try out So these steps should work * grab trunk & build it * boot up the broker * view the web console at http://0.0.0.0:8161/admin * go to the queues tab * you should now see an empty "example.A" queue * try send some messages to this queue (there's a Send To link on the right) * in a second or so hit refresh on the queues view; you should now see the "example.B" queue with the message inside, with the example.A queue now being empty > Another question I have is, how do I reload new definitions without > restarting? I've I'd like to change destinations or filtering how can > I do that on the fly and be sure I'm not dropping any messages? So rules defined in a Spring.xml file can be reloaded on change of the XML file; if you want to redeploy your rules on the fly, you might wanna boot up a separate spring application context with just the rules inside (so that the broker isnt' redeployed too). e.g. create a WAR or stand alone Java program with your rules so they can be re-loaded on the fly without restarting your broker -- James ------- http://macstrac.blogspot.com/