Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 93707 invoked from network); 23 Sep 2009 18:13:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Sep 2009 18:13:44 -0000 Received: (qmail 60317 invoked by uid 500); 23 Sep 2009 18:13:43 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 60296 invoked by uid 500); 23 Sep 2009 18:13:43 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 60286 invoked by uid 99); 23 Sep 2009 18:13:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2009 18:13:43 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.220.222] (HELO mail-fx0-f222.google.com) (209.85.220.222) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2009 18:13:34 +0000 Received: by fxm22 with SMTP id 22so872101fxm.36 for ; Wed, 23 Sep 2009 11:13:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.125.19 with SMTP id c19mr1091282mun.59.1253729590712; Wed, 23 Sep 2009 11:13:10 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Sep 2009 20:13:10 +0200 Message-ID: Subject: Re: JMS, ACL and connecting to existing exchange/queue From: JAkub Scholz To: users@qpid.apache.org Content-Type: multipart/alternative; boundary=0016e65aef40e618aa047442aacf X-Virus-Checked: Checked by ClamAV on apache.org --0016e65aef40e618aa047442aacf Content-Type: text/plain; charset=ISO-8859-1 Hi Rajith, Thanks for your help. Unfortunately, it helped only partially. With these properties I'm able to create the producer and the consumer/listener. It seems, that the consumer/listener needs also access privileges for the exchange to be able to receive some messages. But the problem is in the message producer. I'm able to create the MessageProducer instance, but when I try to send some messages (using the send method of MessageProducer instance), it is still trying to declare the exchange instead just publishing a message to existing exchange and I get again the same error "not-allowed: ACL denied exhange declare request from ..." run: 23.09.2009 20:06:17 org.apache.qpid.jndi.PropertiesFileInitialContextFactory getInitialContext INFO: No Provider URL specified. 23.09.2009 20:06:17 org.apache.qpid.client.AMQConnection INFO: Connection:amqp://********:********@TestClient/********?brokerlist='tcp://********:******** 23.09.2009 20:06:17 org.apache.qpid.transport.util.Logger warn WARNUNG: Ignoring the idle timeout 0 set by the connection, using the brokers max value 120 23.09.2009 20:06:18 org.apache.qpid.client.BasicMessageProducer setPublishMode INFO: MessageProducer org.apache.qpid.client.BasicMessageProducer_0_10@1a06e38 using publish mode : ASYNC_PUBLISH_ALL org.apache.qpid.transport.SessionException: ch=0 id=0 ExecutionException(errorCode=NOT_ALLOWED, commandId=0, classCode=7, commandCode=1, fieldIndex=0, description=not-allowed: ACL denied exhange declare request from eurex@QPID18787 (qpid/broker/SessionAdapter.cpp:73), errorInfo={}) at org.apache.qpid.transport.Session.invoke(Session.java:543) at org.apache.qpid.transport.SessionInvoker.messageTransfer(SessionInvoker.java:96) at org.apache.qpid.client.BasicMessageProducer_0_10.sendMessage(BasicMessageProducer_0_10.java:166) at org.apache.qpid.client.BasicMessageProducer.sendImpl(BasicMessageProducer.java:489) at org.apache.qpid.client.BasicMessageProducer.sendImpl(BasicMessageProducer.java:444) at org.apache.qpid.client.BasicMessageProducer.send(BasicMessageProducer.java:313) at JMSProducer.runProducer(JMSProducer.java:72) at JMSProducer.main(JMSProducer.java:31) Caught an Exception: javax.jms.JMSException: Exception when sending message Regards JAkub On Thu, Sep 10, 2009 at 9:43 PM, Rajith Attapattu wrote: > Hello Jakub, > > By default, the Qpid JMS client creates exchanges and queues. > You can use -Dqpid.declare_exchanges=false and > -Dqpid.declare_queues=false to turn off this behaviour. > That should do what you are looking for. > > Regards, > > Rajith > > On Thu, Sep 10, 2009 at 2:38 PM, JAkub Scholz wrote: > > Hi, > > > > I have a qpid broker with all exchanges and queues predefined and with > ACL > > limiting users only to publish messages to specific exchanges and consume > > messages from specific queues. > > > > Now I want to write a small client application written in Java using JMS > > which should connect to a exchange/queue specified in properties file and > > sent/retrieve messages. Unfortunately, although the exchanges and queues > I > > want to connect to are already created, my client app always fails with > > exception "not-allowed: ACL denied exhange declare request ...". > According > > to the broker log, the application wants to create a new exchange instead > of > > connect to existing exchange. If I turn off the ACL or give create > > permissions for the exchange/queue to the user I'm connecting with > > everything is working fine. > > > > The same problem appears also with the example JMS applications provided > > with qpid. > > > > Is there any possibility to connect to existing exchanges/queues with JMS > > without trying to create the destinations? > > > > Thanks for any kind of help > > > > Regards > > JAkub > > > > > > -- > Regards, > > Rajith Attapattu > Red Hat > http://rajith.2rlabs.com/ > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:users-subscribe@qpid.apache.org > > --0016e65aef40e618aa047442aacf--