Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 03041176A7 for ; Tue, 3 Feb 2015 08:44:23 +0000 (UTC) Received: (qmail 13815 invoked by uid 500); 3 Feb 2015 08:44:23 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 13757 invoked by uid 500); 3 Feb 2015 08:44:23 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 13745 invoked by uid 99); 3 Feb 2015 08:44:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 08:44:23 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of morgan.hautman@gmail.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-wg0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 08:43:57 +0000 Received: by mail-wg0-f52.google.com with SMTP id y19so43177559wgg.11 for ; Tue, 03 Feb 2015 00:43:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=ng8KO81ZbJrCthykinvXfeBVG4sNvTkKuSCTXlSTfh4=; b=SZigc8Shx0WKUzwtXs2B7iyo8/OpT/Ku/o1XJlbPNJ0pzdROj6srs950hcTK2L2hDX Emo9ihBtfUom8epVGJ+jc8BQoq2LlrJrTHYVRMX7oNVAAfVT1odvztbAVwq723taPqPo Oo74c7+EWd08z90YU6YRoJ8xaqJbdKqzUkWLgBKUcoQK6xxdH+ad04tj6l3djxKzYw95 O1xiCYcjwiuGTostU5BVW2jvvNL02BBHEyRkqAmnhI9+wEN9aQXU7h5q6z9uLV3IXUra YgNpxTRoOzmRsCcSTiE26aQw8SUEq+70ky2UREUCZriaCM+8EHofMVobT5gpdZuiKoV3 ZQqA== X-Received: by 10.180.91.109 with SMTP id cd13mr31923134wib.46.1422953035559; Tue, 03 Feb 2015 00:43:55 -0800 (PST) Received: from [10.99.8.16] ([94.143.188.0]) by mx.google.com with ESMTPSA id vq9sm31556224wjc.6.2015.02.03.00.43.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Feb 2015 00:43:54 -0800 (PST) Message-ID: <54D08A49.8090604@gmail.com> Date: Tue, 03 Feb 2015 09:43:53 +0100 From: Morgan Hautman User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: Routing messages to ActiveMQ queue References: <1422952253943-5762345.post@n5.nabble.com> In-Reply-To: <1422952253943-5762345.post@n5.nabble.com> Content-Type: multipart/alternative; boundary="------------050103060900050007050100" X-Virus-Checked: Checked by ClamAV on apache.org --------------050103060900050007050100 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit HI Frank, Try with this : from("timer:foo?period=1s").setBody(body().append("Message at ${date:now:yyyy-MM-dd HH:mm:ss}")).to("|activemq:|activemq/queue/TestQueue "); activemq: http://camel.apache.org/activemq.html On 3/02/2015 9:30, frank1970 wrote: > Hi all! > I'm trying to route some messages to an ActiveMQ server. Basically I'd need > to rewrite the tomcat-active-example to use Camel Java API and run in on > another application server. > So I have started ActiveMQ on my machine and defined a queue named > "activemq/queue/TestQueue". > Next I have coded as follows the connection to ActiveMQ: > > CamelContext context = new DefaultCamelContext(); > ConnectionFactory connectionFactory = new ActiveMQConnectionFactory( > "tcp://0.0.0.0:61616"); > context.addComponent("jms", > JmsComponent.jmsComponentAutoAcknowledge(connectionFactory)); > context.addRoutes(new RouteBuilder() { > public void configure() { > from("timer:foo?period=1s").setBody(body().append("Message at > ${date:now:yyyy-MM-dd HH:mm:ss}")).to("jms:activemq:/queue/TestQueue"); > } > }); > > The application executes without any error, however surfing on the ActiveMQ > console I can see no messages have been received by any consumer. Any idea > what's wrong with it? > Thanks > Frank > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Routing-messages-to-ActiveMQ-queue-tp5762345.html > Sent from the Camel - Users mailing list archive at Nabble.com. --------------050103060900050007050100--