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 76B3E18431 for ; Thu, 18 Jun 2015 12:59:35 +0000 (UTC) Received: (qmail 24435 invoked by uid 500); 18 Jun 2015 12:59:35 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 24393 invoked by uid 500); 18 Jun 2015 12:59:35 -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 24381 invoked by uid 99); 18 Jun 2015 12:59:34 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2015 12:59:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6843A182234 for ; Thu, 18 Jun 2015 12:59:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.142 X-Spam-Level: ** X-Spam-Status: No, score=2.142 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-1.108, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id WlKdyl4K99tT for ; Thu, 18 Jun 2015 12:59:33 +0000 (UTC) Received: from mail-ie0-f170.google.com (mail-ie0-f170.google.com [209.85.223.170]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id D4A6527650 for ; Thu, 18 Jun 2015 12:59:32 +0000 (UTC) Received: by iecrd14 with SMTP id rd14so54053136iec.3 for ; Thu, 18 Jun 2015 05:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=PIDdvCGd++VLgwEXbjvi5xKVc1BVR8N+DctJ54De9fA=; b=HX0jdlYFlOaI+1XopQdlA/lFzDU2tB2quvdwXEg2L+rbTB/OM9Vbs8uBGS5flgkXjq uXencPOOWEvkCCRu5GwqNgw22A4YH9q3IQmEceF+PrYMovNaU6CZNN46eeSTucdbREqP wLPmkFYbxYQuW82C+KBSNTG5mPlvlwNsBIAM/Oh8fJhbI7Ipbd/1Z0OAD3x4jFTOkVfp DoSa8TDzSOg/yC9kHHohsCfWDWsEVq8BYvcOtARUHQi/ti1rE4w9/G5THXBcVkF9ZT/q Yrp1/Bq/pBm7UpYr8imjA7/bmqyFtVzXvy00zrSarGZjf4LywEn/SlSNGq8yfZbk5zsH wORQ== MIME-Version: 1.0 X-Received: by 10.50.109.138 with SMTP id hs10mr17923603igb.48.1434632372323; Thu, 18 Jun 2015 05:59:32 -0700 (PDT) Sender: tbain98@gmail.com Received: by 10.50.251.141 with HTTP; Thu, 18 Jun 2015 05:59:32 -0700 (PDT) Received: by 10.50.251.141 with HTTP; Thu, 18 Jun 2015 05:59:32 -0700 (PDT) In-Reply-To: References: Date: Thu, 18 Jun 2015 06:59:32 -0600 X-Google-Sender-Auth: 5mTNseHDo8NzoNze5gOPnmef-Y8 Message-ID: Subject: Re: Can I make createQueue on embedded broker session create a queue on the remote broker as well? From: Tim Bain To: ActiveMQ Users Content-Type: multipart/alternative; boundary=089e0122e6aaefaa0b0518ca60aa --089e0122e6aaefaa0b0518ca60aa Content-Type: text/plain; charset=UTF-8 Have you set up your dynamically included destinations as described by the "dynamic networks" section of http://activemq.apache.org/networks-of-brokers.html? Note that under that setup, messages will be forwarded to the standalone remote broker only if there is a currently-attached consumer on the remote broker; if there is no consumer, messages will stay on whichever broker they were first sent to. If that's not acceptable, the normal solution is to use statically included destinations (see the "pure static networks" section just below), but as far as I know there's no way to use wildcards so you'd have to list them all in advance. Tim On Jun 18, 2015 6:05 AM, "pubudu gunawardena" wrote: > To elaborate more, I am using an embedded broker to gain the benefits > mentioned at > http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html > . > But I want to dynamically create queues without knowing the name > beforehand. > > On Thu, Jun 18, 2015 at 5:32 PM, pubudu gunawardena > wrote: > > Hi All, > > > > I am quite new to ActiveMQ and am trying to figure out a solution to > > the following. > > > > I have an embedded broker and a remote broker. > > From my code I do the following to create a session on the embedded > > broker and to create a queue there. > > > > factory = new > ActiveMQConnectionFactory("tcp://localhost:61617"); > > connection = factory.createConnection(); > > connection.start(); > > session = connection.createSession(false, > Session.AUTO_ACKNOWLEDGE); > > destination = session.createQueue("SAMPLEQUEUE"); > > > > I want a queue with the same name to be created on the remote broker > > when I do that and any messages I send to that queue on the embedded > > broker to go to the remote broker. > > > > I have looked at the the documentation on JMS to JMS Bridge mentioned > > at http://activemq.apache.org/jms-to-jms-bridge.html but it seems that > > I have to know the queue name beforehand in order to create a > > OutboundQueueBridge. > > > > Is there any way that I can dynamically create the queue on the > > remote broker when I call the createConnection as I have mentioned > > above? Is there any configuration in the JMS to JMS bridge which > > enables that? > > -- > > Thanks, > > Pubudu > > > > -- > Thanks, > Pubudu > --089e0122e6aaefaa0b0518ca60aa--