java no-auth
Hello there, I would like to run the qpid-config python script against the java qpid-server. When I do something like python qpid-config add exchange topic MsgServer --durable --sequence I get Failed: AuthenticationFailure: sasl negotiation failed: no mechanism agreed If I was to run the Cpp version, qpidd with no-auth, that would work nicely. Now my question is: what do I need to configure to run my java server with the no-auth cpp equivalent ? Kind Regards Laurent
RE: java no-auth
Hi Gordon, Yes, I think I went slightly further - python qpid-config -b guest/guest@192.168.1.3:5672 add exchange topic MsgServer --durable --sequence gives me this Failed: NotFound: no such queue: qmf.default.topic I just want to replicate in the java world the setup I have with qpidd. Which boils down to being able to run the broker with auth=no and with a topic that would be created by the pyton script above. If there was a way to populate virtualhosts.xml that would be wonderful but I am not sure that's doable at the moment... Kind Regards -Original Message- From: Gordon Sim [mailto:g...@redhat.com] Sent: 21 August 2012 16:18 To: users@qpid.apache.org Subject: Re: java no-auth On 08/21/2012 01:03 PM, laurent.deco...@sungard.com wrote: Hello there, I would like to run the qpid-config python script against the java qpid-server. When I do something like python qpid-config add exchange topic MsgServer --durable --sequence I get Failed: AuthenticationFailure: sasl negotiation failed: no mechanism agreed You can get around that by specifying a username and password as part of the broker url e.g. -b guest/guest@myhost:5672. That will enable PLAIN on the client which should succeed. If I was to run the Cpp version, qpidd with no-auth, that would work nicely. Now my question is: what do I need to configure to run my java server with the no-auth cpp equivalent ? As above, one option is to use the guest/guest account which exists by default. Alternatively you can enable ANONYMOUS support for qpid-server, but I'll have to defer to others for details on how to accomplish that. One word of warning however, is that the python based command line tools such as qpid-config were developed against qpidd and so don't work perfectly against qpid-server for all cases. Creating and deleting is ok, querying tends to give confusing results. Even worse however, for the upcoming 0.18 release they don't work at all. If you can describe your use case there may be some suggestion on alternate ways to accomplish it that may cause less frustration. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: java no-auth
On 08/21/2012 03:19 PM, laurent.deco...@sungard.com wrote: Yes, I think I went slightly further - python qpid-config -b guest/guest@192.168.1.3:5672 add exchange topic MsgServer --durable --sequence gives me this Failed: NotFound: no such queue: qmf.default.topic Ah, so thats broken already with the version you are using... I thought this was something recent with 0.18. What versions of tools are you using? I just want to replicate in the java world the setup I have with qpidd. Which boils down to being able to run the broker with auth=no and with a topic that would be created by the pyton script above. If there was a way to populate virtualhosts.xml that would be wonderful but I am not sure that's doable at the moment... Unfortunately at present the two brokers remain quite different from a management perspective. There is a desire to close this gap, but we have made no sustained progress in realising that. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: java no-auth
Hi Laurent, Do you need to use the qpid-config tool? Can't you configure the exchanges/queues either in the virtualhosts.xml file or using the JMX Management Console? Regards Jakub On Tue, Aug 21, 2012 at 4:19 PM, laurent.deco...@sungard.com wrote: Hi Gordon, Yes, I think I went slightly further - python qpid-config -b guest/guest@192.168.1.3:5672 add exchange topic MsgServer --durable --sequence gives me this Failed: NotFound: no such queue: qmf.default.topic I just want to replicate in the java world the setup I have with qpidd. Which boils down to being able to run the broker with auth=no and with a topic that would be created by the pyton script above. If there was a way to populate virtualhosts.xml that would be wonderful but I am not sure that's doable at the moment... Kind Regards -Original Message- From: Gordon Sim [mailto:g...@redhat.com] Sent: 21 August 2012 16:18 To: users@qpid.apache.org Subject: Re: java no-auth On 08/21/2012 01:03 PM, laurent.deco...@sungard.com wrote: Hello there, I would like to run the qpid-config python script against the java qpid-server. When I do something like python qpid-config add exchange topic MsgServer --durable --sequence I get Failed: AuthenticationFailure: sasl negotiation failed: no mechanism agreed You can get around that by specifying a username and password as part of the broker url e.g. -b guest/guest@myhost:5672. That will enable PLAIN on the client which should succeed. If I was to run the Cpp version, qpidd with no-auth, that would work nicely. Now my question is: what do I need to configure to run my java server with the no-auth cpp equivalent ? As above, one option is to use the guest/guest account which exists by default. Alternatively you can enable ANONYMOUS support for qpid-server, but I'll have to defer to others for details on how to accomplish that. One word of warning however, is that the python based command line tools such as qpid-config were developed against qpidd and so don't work perfectly against qpid-server for all cases. Creating and deleting is ok, querying tends to give confusing results. Even worse however, for the upcoming 0.18 release they don't work at all. If you can describe your use case there may be some suggestion on alternate ways to accomplish it that may cause less frustration. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
RE: java no-auth
Hi Jakub, I am using 0.16 Here is something that works ;) I managed to recreate the equivalent to this call python qpid-config add queue ApexInbound --durable call python qpid-config bind amq.direct ApexInbound ApexInbound with the java broker, by adding simply this to the virtualhost.xml queues exchangeamq.direct/exchange maximumQueueDepth4235264/maximumQueueDepth !--4Mb -- maximumMessageSize2117632/maximumMessageSize !--2Mb -- maximumMessageAge60/maximumMessageAge !--10 mins -- maximumMessageCount50/maximumMessageCount !--50 messages -- queue nameApexInbound/name /queue queue nameApexOutbound/name /queue queue nameApexErrorOutbpound/name /queue /queues Have you got any idea as to how to get the equivalent for python qpid-config add exchange topic MsgServer --durable --sequence I don't mind at this point which method I use, so long as the topic / exchange is created properly :) Kind Regards -Original Message- From: Jakub Scholz [mailto:ja...@scholz.cz] Sent: 21 August 2012 16:42 To: users@qpid.apache.org Subject: Re: java no-auth Hi Laurent, Do you need to use the qpid-config tool? Can't you configure the exchanges/queues either in the virtualhosts.xml file or using the JMX Management Console? Regards Jakub On Tue, Aug 21, 2012 at 4:19 PM, laurent.deco...@sungard.com wrote: Hi Gordon, Yes, I think I went slightly further - python qpid-config -b guest/guest@192.168.1.3:5672 add exchange topic MsgServer --durable --sequence gives me this Failed: NotFound: no such queue: qmf.default.topic I just want to replicate in the java world the setup I have with qpidd. Which boils down to being able to run the broker with auth=no and with a topic that would be created by the pyton script above. If there was a way to populate virtualhosts.xml that would be wonderful but I am not sure that's doable at the moment... Kind Regards -Original Message- From: Gordon Sim [mailto:g...@redhat.com] Sent: 21 August 2012 16:18 To: users@qpid.apache.org Subject: Re: java no-auth On 08/21/2012 01:03 PM, laurent.deco...@sungard.com wrote: Hello there, I would like to run the qpid-config python script against the java qpid-server. When I do something like python qpid-config add exchange topic MsgServer --durable --sequence I get Failed: AuthenticationFailure: sasl negotiation failed: no mechanism agreed You can get around that by specifying a username and password as part of the broker url e.g. -b guest/guest@myhost:5672. That will enable PLAIN on the client which should succeed. If I was to run the Cpp version, qpidd with no-auth, that would work nicely. Now my question is: what do I need to configure to run my java server with the no-auth cpp equivalent ? As above, one option is to use the guest/guest account which exists by default. Alternatively you can enable ANONYMOUS support for qpid-server, but I'll have to defer to others for details on how to accomplish that. One word of warning however, is that the python based command line tools such as qpid-config were developed against qpidd and so don't work perfectly against qpid-server for all cases. Creating and deleting is ok, querying tends to give confusing results. Even worse however, for the upcoming 0.18 release they don't work at all. If you can describe your use case there may be some suggestion on alternate ways to accomplish it that may cause less frustration. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: Hard-coded destination parameters prevent creation of Producer and Consumer
Failed to mention that I'm using java client 0.16. Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Hard-coded-destination-parameters-prevent-creation-of-Producer-and-Consumer-tp7581160p7581161.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: Java example Hello.java throws NPE
Failed to mention that I'm using java client 0.16. Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-tp7581155p7581162.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Java example Hello.java throws NPE
New to qpid. Looking to implement transparent interface to amqp/jms servers. Currently running Rabbitmq (amqp 0.9.1) and old version of OpenMQ (IMQ) on Centos 5.2. Tried to run the packaged examples prior to jumping into integrating with current code. When I try to run the hello.java example (org.apache.qpid.example.Hello.java) it generates a null pointer exception as follows: java.lang.NullPointerException at org.apache.qpid.client.BasicMessageProducer_0_8.declareDestination(BasicMessageProducer_0_8.java:56) at org.apache.qpid.client.BasicMessageProducer.init(BasicMessageProducer.java:150) at org.apache.qpid.client.BasicMessageProducer_0_8.init(BasicMessageProducer_0_8.java:49) at org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.java:463) at org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.java:56) at org.apache.qpid.client.AMQSession$7.execute(AMQSession.java:2622) at org.apache.qpid.client.AMQSession$7.execute(AMQSession.java:2613) at org.apache.qpid.client.AMQConnectionDelegate_8_0.executeRetrySupport(AMQConnectionDelegate_8_0.java:324) at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:577) at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102) at org.apache.qpid.client.AMQSession.createProducerImpl(AMQSession.java:2611) at org.apache.qpid.client.AMQSession.createProducer(AMQSession.java:1193) at org.apache.qpid.client.AMQSession.createProducer(AMQSession.java:97) at com.pason.transport.example.Hello.runTest(Hello.java:129) at com.pason.transport.example.Hello.main(Hello.java:46) BasicMessageProducer_0_8 fails due to the exchange name being set to null. The subsequent toString causes the NPE. Should the exchange name not default to / when undefined? Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-tp7581155.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Hard-coded destination parameters prevent creation of Producer and Consumer
Trying to connect to pre-existing durable destinations on RabbitMQ. Using qpid 0.16. When trying to create a producer of consumer extending the Hello.java example, the server logs the following: {amqp_error,precondition_failed, cannot redeclare exchange 'myExchange' in vhost '/' with different type, durable, internal or autodelete value, 'exchange.declare'} The key entries in my property file are as follows: connectionfactory.qpidConnectionfactory = amqp://guest:guest@localhost/?brokerlist='tcp://localhost:5672' destination.queue = BURL:direct://myExchange//myQueue?autodelete='false'durable='true'internal='false'routingkey='testRoute' I downloaded the source and found that BasicMessageProducer.declareDestination method makes a createExchangeDeclareBody call with hard-coded boolean values for the durability, autodelete, internal and nowait parameters. A similar approach exists in AMQSession_0_8.sendExchnageDeclare which is called when setting up a consumer. Why are these hard-coded when the destination contains some (durable, autodelete) of the required values? There is a comment following the code which states: // Note that the durable and internal arguments are ignored since passive is set to false This is inaccurate as passive is set to: destination.getExchangeName().toString().startsWith(amq.) When I changed the code to use the destination values, it successfully created the producer. I can now send messages. With respect to the consumer, the ExchangeDeclareBody was successfully created, but the system hangs on protocolHandler.syncWrite. Digging into that now. With respect to other hard coded booleans, I'm not familiar with the purpose of the nowait parameter yet, or its possible source, so I left it unchanged in my implementation. The internal boolean, seems to be associated with the exchanged name. Will familiarize myself and possibly update in future reply. It too was left as is. Any advice or insight on the issues I've resolved or am currently encountering would be appreciated. Thx, Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Hard-coded-destination-parameters-prevent-creation-of-Producer-and-Consumer-tp7581160.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
RE: java no-auth
Hi there, exchanges exchange typetopic/type nameMsgServer/name durabletrue/durable sequencetrue/sequence /exchange /exchanges I tried this, and it does not seem to work. Do you know how I could query the java broker so that I could see what is actually up running ? -Original Message- From: Jakub Scholz [mailto:ja...@scholz.cz] Sent: 21 August 2012 17:12 To: users@qpid.apache.org Subject: Re: java no-auth You can configure the exchange like this: virtualhost namelocalhost/name localhost exchanges exchange typetopic/type nameMsgServer/name durabletrue/durable /exchange /exchanges ... /localhost /virtualhost This should create the exchange as durable and topic. I'm not sure you can have the exchange level sequencing with Java broker. Regards Jakub On Tue, Aug 21, 2012 at 4:45 PM, laurent.deco...@sungard.com wrote: Hi Jakub, I am using 0.16 Here is something that works ;) I managed to recreate the equivalent to this call python qpid-config add queue ApexInbound --durable call python qpid-config bind amq.direct ApexInbound ApexInbound with the java broker, by adding simply this to the virtualhost.xml queues exchangeamq.direct/exchange maximumQueueDepth4235264/maximumQueueDepth !--4Mb -- maximumMessageSize2117632/maximumMessageSize !--2Mb -- maximumMessageAge60/maximumMessageAge !--10 mins -- maximumMessageCount50/maximumMessageCount !--50 messages -- queue nameApexInbound/name /queue queue nameApexOutbound/name /queue queue nameApexErrorOutbpound/name /queue /queues Have you got any idea as to how to get the equivalent for python qpid-config add exchange topic MsgServer --durable --sequence I don't mind at this point which method I use, so long as the topic / exchange is created properly :) Kind Regards -Original Message- From: Jakub Scholz [mailto:ja...@scholz.cz] Sent: 21 August 2012 16:42 To: users@qpid.apache.org Subject: Re: java no-auth Hi Laurent, Do you need to use the qpid-config tool? Can't you configure the exchanges/queues either in the virtualhosts.xml file or using the JMX Management Console? Regards Jakub On Tue, Aug 21, 2012 at 4:19 PM, laurent.deco...@sungard.com wrote: Hi Gordon, Yes, I think I went slightly further - python qpid-config -b guest/guest@192.168.1.3:5672 add exchange topic MsgServer --durable --sequence gives me this Failed: NotFound: no such queue: qmf.default.topic I just want to replicate in the java world the setup I have with qpidd. Which boils down to being able to run the broker with auth=no and with a topic that would be created by the pyton script above. If there was a way to populate virtualhosts.xml that would be wonderful but I am not sure that's doable at the moment... Kind Regards -Original Message- From: Gordon Sim [mailto:g...@redhat.com] Sent: 21 August 2012 16:18 To: users@qpid.apache.org Subject: Re: java no-auth On 08/21/2012 01:03 PM, laurent.deco...@sungard.com wrote: Hello there, I would like to run the qpid-config python script against the java qpid-server. When I do something like python qpid-config add exchange topic MsgServer --durable --sequence I get Failed: AuthenticationFailure: sasl negotiation failed: no mechanism agreed You can get around that by specifying a username and password as part of the broker url e.g. -b guest/guest@myhost:5672. That will enable PLAIN on the client which should succeed. If I was to run the Cpp version, qpidd with no-auth, that would work nicely. Now my question is: what do I need to configure to run my java server with the no-auth cpp equivalent ? As above, one option is to use the guest/guest account which exists by default. Alternatively you can enable ANONYMOUS support for qpid-server, but I'll have to defer to others for details on how to accomplish that. One word of warning however, is that the python based command line tools such as qpid-config were developed against qpidd and so don't work perfectly against qpid-server for all cases. Creating and deleting is ok, querying tends to give confusing results. Even worse however, for the upcoming 0.18 release they don't work at all. If you can describe your use case there may be some suggestion on alternate ways to accomplish it that may cause less frustration.
Re: java no-auth
I guess probably the easiest way to see whats going on with the broker is to use the JMX console ... http://qpid.apache.org/books/0.16/AMQP-Messaging-Broker-Java-Book/html/Qpid-JMX-Management-Console.html Why do you assume that it doesn't work - do you get an error in the client when sending the message to the exchange? Regards JAkub On Tue, Aug 21, 2012 at 8:01 PM, laurent.deco...@sungard.com wrote: Hi there, exchanges exchange typetopic/type nameMsgServer/name durabletrue/durable sequencetrue/sequence /exchange /exchanges I tried this, and it does not seem to work. Do you know how I could query the java broker so that I could see what is actually up running ? -Original Message- From: Jakub Scholz [mailto:ja...@scholz.cz] Sent: 21 August 2012 17:12 To: users@qpid.apache.org Subject: Re: java no-auth You can configure the exchange like this: virtualhost namelocalhost/name localhost exchanges exchange typetopic/type nameMsgServer/name durabletrue/durable /exchange /exchanges ... /localhost /virtualhost This should create the exchange as durable and topic. I'm not sure you can have the exchange level sequencing with Java broker. Regards Jakub On Tue, Aug 21, 2012 at 4:45 PM, laurent.deco...@sungard.com wrote: Hi Jakub, I am using 0.16 Here is something that works ;) I managed to recreate the equivalent to this call python qpid-config add queue ApexInbound --durable call python qpid-config bind amq.direct ApexInbound ApexInbound with the java broker, by adding simply this to the virtualhost.xml queues exchangeamq.direct/exchange maximumQueueDepth4235264/maximumQueueDepth !--4Mb -- maximumMessageSize2117632/maximumMessageSize !--2Mb -- maximumMessageAge60/maximumMessageAge !--10 mins -- maximumMessageCount50/maximumMessageCount !--50 messages -- queue nameApexInbound/name /queue queue nameApexOutbound/name /queue queue nameApexErrorOutbpound/name /queue /queues Have you got any idea as to how to get the equivalent for python qpid-config add exchange topic MsgServer --durable --sequence I don't mind at this point which method I use, so long as the topic / exchange is created properly :) Kind Regards -Original Message- From: Jakub Scholz [mailto:ja...@scholz.cz] Sent: 21 August 2012 16:42 To: users@qpid.apache.org Subject: Re: java no-auth Hi Laurent, Do you need to use the qpid-config tool? Can't you configure the exchanges/queues either in the virtualhosts.xml file or using the JMX Management Console? Regards Jakub On Tue, Aug 21, 2012 at 4:19 PM, laurent.deco...@sungard.com wrote: Hi Gordon, Yes, I think I went slightly further - python qpid-config -b guest/guest@192.168.1.3:5672 add exchange topic MsgServer --durable --sequence gives me this Failed: NotFound: no such queue: qmf.default.topic I just want to replicate in the java world the setup I have with qpidd. Which boils down to being able to run the broker with auth=no and with a topic that would be created by the pyton script above. If there was a way to populate virtualhosts.xml that would be wonderful but I am not sure that's doable at the moment... Kind Regards -Original Message- From: Gordon Sim [mailto:g...@redhat.com] Sent: 21 August 2012 16:18 To: users@qpid.apache.org Subject: Re: java no-auth On 08/21/2012 01:03 PM, laurent.deco...@sungard.com wrote: Hello there, I would like to run the qpid-config python script against the java qpid-server. When I do something like python qpid-config add exchange topic MsgServer --durable --sequence I get Failed: AuthenticationFailure: sasl negotiation failed: no mechanism agreed You can get around that by specifying a username and password as part of the broker url e.g. -b guest/guest@myhost:5672. That will enable PLAIN on the client which should succeed. If I was to run the Cpp version, qpidd with no-auth, that would work nicely. Now my question is: what do I need to configure to run my java server with the no-auth cpp equivalent ? As above, one option is to use the guest/guest account which exists by default. Alternatively you can enable ANONYMOUS support for qpid-server, but I'll have to defer to others for details on how to accomplish that. One word of warning however, is that the python based command line tools
Re: Java example Hello.java throws NPE
I'm running 0.9.1 broker. By new syntax I assume you mean binding url. Can you direct me to old syntax. Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-tp7581155p7581168.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: Java example Hello.java throws NPE
The new syntax is the addressing format. The old format is BURL which will work with 0-8/0-9 as well. The hello.properties is using the addressing format. If you want to use the older format, do the following BURL:topic://amq.topic?routingkey='test' The format is described here https://cwiki.apache.org/qpid/bindingurlformat.html Are you using a qpid broker ? Is there a reason for using 0.9.1 instead of 0-10 ? Regards, Rajith On Tue, Aug 21, 2012 at 4:10 PM, Roger roger.lefeb...@pason.com wrote: I'm running 0.9.1 broker. By new syntax I assume you mean binding url. Can you direct me to old syntax. Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-tp7581155p7581168.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: Java example Hello.java throws NPE
Roger is using RabbitMQ for the server side. As Rajith has already indicated, the Hello example wont work if you want to use 0-9-1 as the newer address syntax was only implemented for AMQP-0-10 section of the client, but I see from your other emails you have already figured out the BURL: prefix to use the other syntax (you can also use a system property to change the default syntax so you dont need the prefix: -Dqpid.dest_syntax=BURL). If you are only going to be connecting to RabbitMQ then you might also want to use -Dqpid.amqp.version=0-9-1 to restrict the initial connection attempt to AMQP 0-9-1 instead of letting it try 0-10 first and falling back to 0-9-1 when the broker indicates it doesnt support 0-10. (I think the BindingURL example Rajith pasted below might actually be missing a / after amq.topic as well) Robbie On 21 August 2012 21:42, Rajith Attapattu rajit...@gmail.com wrote: The new syntax is the addressing format. The old format is BURL which will work with 0-8/0-9 as well. The hello.properties is using the addressing format. If you want to use the older format, do the following BURL:topic://amq.topic?routingkey='test' The format is described here https://cwiki.apache.org/qpid/bindingurlformat.html Are you using a qpid broker ? Is there a reason for using 0.9.1 instead of 0-10 ? Regards, Rajith On Tue, Aug 21, 2012 at 4:10 PM, Roger roger.lefeb...@pason.com wrote: I'm running 0.9.1 broker. By new syntax I assume you mean binding url. Can you direct me to old syntax. Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-tp7581155p7581168.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: Java example Hello.java throws NPE
On Tue, Aug 21, 2012 at 5:14 PM, Robbie Gemmell robbie.gemm...@gmail.com wrote: Roger is using RabbitMQ for the server side. As Rajith has already indicated, the Hello example wont work if you want to use 0-9-1 as the newer address syntax was only implemented for AMQP-0-10 section of the client, but I see from your other emails you have already figured out the BURL: prefix to use the other syntax (you can also use a system property to change the default syntax so you dont need the prefix: -Dqpid.dest_syntax=BURL). If you are only going to be connecting to RabbitMQ then you might also want to use -Dqpid.amqp.version=0-9-1 to restrict the initial connection attempt to AMQP 0-9-1 instead of letting it try 0-10 first and falling back to 0-9-1 when the broker indicates it doesnt support 0-10. (I think the BindingURL example Rajith pasted below might actually be missing a / after amq.topic as well) I haven't used BURL for a while now :D and relied on the following link for the example. https://cwiki.apache.org/qpid/bindingurlformat.html Robbie On 21 August 2012 21:42, Rajith Attapattu rajit...@gmail.com wrote: The new syntax is the addressing format. The old format is BURL which will work with 0-8/0-9 as well. The hello.properties is using the addressing format. If you want to use the older format, do the following BURL:topic://amq.topic?routingkey='test' The format is described here https://cwiki.apache.org/qpid/bindingurlformat.html Are you using a qpid broker ? Is there a reason for using 0.9.1 instead of 0-10 ? Regards, Rajith On Tue, Aug 21, 2012 at 4:10 PM, Roger roger.lefeb...@pason.com wrote: I'm running 0.9.1 broker. By new syntax I assume you mean binding url. Can you direct me to old syntax. Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-tp7581155p7581168.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: Java example Hello.java throws NPE
We are using rabbitmq which is using 0-9. Don't know if it will ever move to 0-10 - some differences of opinion on AMQP front. Played around and got burl to work on default exchange. (BURL:direct:myQueue?routingkey='test') -- View this message in context: http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-tp7581155p7581174.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: Java example Hello.java throws NPE
On Tue, Aug 21, 2012 at 5:21 PM, Roger roger.lefeb...@pason.com wrote: We are using rabbitmq which is using 0-9. Don't know if it will ever move to 0-10 - some differences of opinion on AMQP front. Understood. Played around and got burl to work on default exchange. (BURL:direct:myQueue?routingkey='test') Glad you got it working. Rajith -- View this message in context: http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-tp7581155p7581174.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
Re: Hard-coded destination parameters prevent creation of Producer and Consumer
On 21 August 2012 16:51, Roger roger.lefeb...@pason.com wrote: Trying to connect to pre-existing durable destinations on RabbitMQ. Using qpid 0.16. When trying to create a producer of consumer extending the Hello.java example, the server logs the following: {amqp_error,precondition_failed, cannot redeclare exchange 'myExchange' in vhost '/' with different type, durable, internal or autodelete value, 'exchange.declare'} The key entries in my property file are as follows: connectionfactory.qpidConnectionfactory = amqp://guest:guest@localhost/?brokerlist='tcp://localhost:5672' destination.queue = BURL:direct://myExchange//myQueue?autodelete='false'durable='true'internal='false'routingkey='testRoute' I downloaded the source and found that BasicMessageProducer.declareDestination method makes a createExchangeDeclareBody call with hard-coded boolean values for the durability, autodelete, internal and nowait parameters. A similar approach exists in AMQSession_0_8.sendExchnageDeclare which is called when setting up a consumer. Why are these hard-coded when the destination contains some (durable, autodelete) of the required values? There is a comment following the code which states: // Note that the durable and internal arguments are ignored since passive is set to false This is inaccurate as passive is set to: destination.getExchangeName().toString().startsWith(amq.) I imagine the comment would have been accurate at the time, but someone has made the declares of amq.* (which are in a reserved namespace in the AMQP spec for mandatory exchanges etc) exchanges passive since then. The properties you are setting in the Binding URL are intended (as per the documentation Rajith linked in his mail) to control the properties of the queue which may be declared as a result of using it (consumers do a QueueDeclare when they are created by the 0-8/0-9/0-9-1 client path when using BindingURLs), and not the exchanges. What you are really hitting here is a historical tendancy of the Qpid JMS client and its users to only use the default amq.topic and amq.direct for queues and topics respectively when no inherant restriction to doing so really exists, coupled with limitations of the BindingURL format [and its implementation] that are probably part of the reasons a more expressive syntax was added, albeit it only got implemented for the AMQP 0-10 client path that is used by default against both the Qpid brokers now. Coming from another 0-9-1 client/broker which has resulted in your use of custom exchanges, you are unfortunatley much better placed to feel such pain. When I changed the code to use the destination values, it successfully created the producer. I can now send messages. With respect to the consumer, the ExchangeDeclareBody was successfully created, but the system hangs on protocolHandler.syncWrite. Digging into that now. The only usual reason for it to wait there is that it didn't get the reply frame it was waiting for, posibly because something on the other end went bang. Did you get any further digging into it? With respect to other hard coded booleans, I'm not familiar with the purpose of the nowait parameter yet, or its possible source, so I left it unchanged in my implementation. The internal boolean, seems to be associated with the exchanged name. Will familiarize myself and possibly update in future reply. It too was left as is. Any advice or insight on the issues I've resolved or am currently encountering would be appreciated. Thx, Roger -- View this message in context: http://qpid.2158936.n2.nabble.com/Hard-coded-destination-parameters-prevent-creation-of-Producer-and-Consumer-tp7581160.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org