Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-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 6938E98F1 for ; Sat, 1 Oct 2011 21:12:18 +0000 (UTC) Received: (qmail 67540 invoked by uid 500); 1 Oct 2011 21:12:18 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 67506 invoked by uid 500); 1 Oct 2011 21:12:18 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 67498 invoked by uid 99); 1 Oct 2011 21:12:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 21:12:17 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mjabali@fusesource.com designates 74.125.245.90 as permitted sender) Received: from [74.125.245.90] (HELO na3sys010aog111.obsmtp.com) (74.125.245.90) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 21:12:11 +0000 Received: from mail-yx0-f170.google.com ([209.85.213.170]) (using TLSv1) by na3sys010aob111.postini.com ([74.125.244.12]) with SMTP; Sat, 01 Oct 2011 14:11:50 PDT Received: by mail-yx0-f170.google.com with SMTP id 13so2994685yxi.29 for ; Sat, 01 Oct 2011 14:11:50 -0700 (PDT) Received: by 10.236.75.165 with SMTP id z25mr79659297yhd.68.1317503509353; Sat, 01 Oct 2011 14:11:49 -0700 (PDT) Received: from [192.168.1.102] (201-43-50-106.dsl.telesp.net.br. [201.43.50.106]) by mx.google.com with ESMTPS id n18sm10827387yhi.14.2011.10.01.14.11.47 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 01 Oct 2011 14:11:48 -0700 (PDT) From: Marcelo Jabali Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-12--106112837 Subject: Re: Understanding basic config Date: Sat, 1 Oct 2011 14:11:43 -0700 In-Reply-To: To: users@activemq.apache.org References: <1317249209.2856.11.camel@OfficePC> <9FB9E2AC-B626-4876-9CFF-FF9EB6D22850@fusesource.com> Message-Id: <7F95A58B-7DC2-4D96-A03F-E9D32C226023@fusesource.com> X-Mailer: Apple Mail (2.1084) --Apple-Mail-12--106112837 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Because you are basically mixing two different approaches where clients = running on the same JVM take the advantage of connecting to local = brokers and remote clients connect to the broker using the regular TCP = approach. There are additional references available here: = http://activemq.apache.org/configuring-transports.html On Oct 1, 2011, at 10:31 AM, Mohit Anchlia wrote: > On Sat, Oct 1, 2011 at 12:06 AM, Marcelo Jabali = wrote: >> Mohit, >>=20 >> ActiveMQ has several transport protocols available (connection URLs = for a client to connect to a broker). >> TCP - is used when clients connect to the broker using a TCP socket. = VM - is used when you are embedding the broker in your app (client and = broker running on the same JVM) and you want to take the performance = benefits of connecting the clients to the broker without hitting the = network layer. Everything goes through in-memory buffers. >>=20 >> Hope this helps, >=20 > That I understand but still not clear about why broker and the factor > are different? Why would broker listen on tcp if client is using vm > call? >=20 > >=20 > > > > >=20 >=20 > >=20 > >=20 >>=20 >> -Marcelo >>=20 >>=20 >> On Sep 28, 2011, at 4:18 PM, Mohit Anchlia wrote: >>=20 >>> On Wed, Sep 28, 2011 at 3:33 PM, Timothy Bish = wrote: >>>> On Wed, 2011-09-28 at 14:05 -0700, Mohit Anchlia wrote: >>>>> I have this config. Trying to understand few things: >>>>>=20 >>>>> 1. what's the different between uri=3D"tcp://localhost:0" and >>>>> brokerURL=3D"vm://localhost" ? >>>>> 2. In point 1 why are both not tcp? >>>>> 3. what is :0? That doesn't look like a port to me. Is this = specifial >>>>> for embedded broker? >>>>>=20 >>>>>=20 >>>>>=20 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>=20 >>>>> >>>>> >>>> physicalName=3D"org.apache.activemq.spring.Test.spring.embedded"/> >>>>>=20 >>>>> >>>>> >>>>=20 >>>> Have a look at the Version 5 Transports page for info on the = various >>>> transports. >>>> http://activemq.apache.org/configuring-version-5-transports.html >>>>=20 >>>> For the TCP transport setting the port to zero means that you want = the >>>> broker to pick an open TCP port. Normally you wouldn't do this in = the >>>> configuration since will change every time you start the broker, = this is >>>> more useful for unit tests where you want to ensure you get an open >>>> port. >>>>=20 >>>>=20 >>>=20 >>> I couldn't get answer to my point 1 and 2 >>>=20 >>> 1. what's the different between uri=3D"tcp://localhost:0" and >>> brokerURL=3D"vm://localhost" ? >>>=20 >>> = >>> >>> >>> >>> >>>=20 >>> >>> >>>=20 >>> 2. In point 1 why are both not tcp? >>>=20 >>> 3. And in point 1 how is broker getting associated with the >>> connectionfactory since url is different? >>>=20 >>>=20 >>>> Regards >>>>=20 >>>>=20 >>>>=20 >>>> -- >>>> Tim Bish >>>> ------------ >>>> FuseSource >>>> Email: tim.bish@fusesource.com >>>> Web: http://fusesource.com >>>> Twitter: tabish121 >>>> Blog: http://timbish.blogspot.com/ >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 --Apple-Mail-12--106112837--