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 8AE071825A for ; Tue, 9 Jun 2015 00:37:12 +0000 (UTC) Received: (qmail 95183 invoked by uid 500); 9 Jun 2015 00:37:12 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 95142 invoked by uid 500); 9 Jun 2015 00:37:12 -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 95129 invoked by uid 99); 9 Jun 2015 00:37:11 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2015 00:37:11 +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 5D677183996 for ; Tue, 9 Jun 2015 00:37:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.658 X-Spam-Level: **** X-Spam-Status: No, score=4.658 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001, URI_HEX=1.313, URI_TRY_3LD=1.171] autolearn=disabled Received: from mx1-eu-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 Rk8hOonfIAWB for ; Tue, 9 Jun 2015 00:37:01 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 4F2C6251D5 for ; Tue, 9 Jun 2015 00:37:00 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id E5D1220669A9 for ; Mon, 8 Jun 2015 17:37:37 -0700 (PDT) Date: Mon, 8 Jun 2015 17:16:48 -0700 (PDT) From: "christopher.l.shannon" To: users@activemq.apache.org Message-ID: <1433809008436-4697452.post@n4.nabble.com> In-Reply-To: <1433778551249-4697413.post@n4.nabble.com> References: <1433778551249-4697413.post@n4.nabble.com> Subject: Re: put a message in queue using org.apache.activemq.broker.Broker MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit As you have found out you shouldn't try and use the JMS client api from inside the broker, as that is for client code. I'm not entirely sure I understand why you can't use advisory topics but if you want to send a message to another destination from inside the broker there are lots of good examples inside the broker itself. One good example in particular is the Statistics Broker class, StatisticsBroker.java If you take a look at the send and sendStats methods, you can see how a new message can be sent to a destination. In your case the key is that you would want to create a message using ActiveMQTextMessage and a destination using the ActiveMQDestination class and then configure a ProducerBrokerExchange so you can send your new message to the destination you want. Hopefully this helps. -- View this message in context: http://activemq.2283324.n4.nabble.com/put-a-message-in-queue-using-org-apache-activemq-broker-Broker-tp4697413p4697452.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.