Ok, thank you for your help.

-----Message d'origine-----
De : Rob Godfrey <rob.j.godf...@gmail.com> 
Envoyé : vendredi 12 février 2021 19:15
À : users@qpid.apache.org
Cc : VARSHNEY Prerna <prerna.varsh...@soprasteria.com>
Objet : Re: [RABBITMQ/QPID-JMS/VHOST] failed to connect to a virtual host

So, the Qpid JMS client only speaks AMQP 1.0.

In the past we released a different JMS client which spoke AMQP 0-9-1, and AMQP 
0-10.  I believe that last release of that is detailed here:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fqpid.apache.org%2Freleases%2Fqpid-java-6.1.7%2Findex.html&amp;data=04%7C01%7Cherbert.koelman%40soprasteria.com%7Cd3edf820fbf341dfaf0408d8cf821dca%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637487505053974823%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=obKDtfcQ9RmUh6jH2X0Dy9mR%2FAByONu%2Bd6ghOrQhtu0%3D&amp;reserved=0

Just to forewarn - I believe there are a few issues where RabbitMQ either chose 
to deviate from the AMQP specification, or the Qpid client implementation 
expects behaviour that is not defined in AMQP 0-9-1 itself.
I know there have been people using this client against RabbitMQ in the past 
with some success though.

-- Rob

Hope this helps,
Rob

On Fri, 12 Feb 2021 at 18:03, KOELMAN Herbert < 
herbert.koel...@soprasteria.com> wrote:

> Got your point.
>
> If I understand this well, if I force QPID to use AMQP 0-9-1 than it 
> might work. Am I assuming well :-)
>
> Is there a way to have QPID explicitly use AMQP 0-9-1 ? Or do I need 
> to downgrade QPID's version ?
>
> (By the way, your help is much appreciated ;-) ) -----Message 
> d'origine----- De : Rob Godfrey <rob.j.godf...@gmail.com> Envoyé : 
> vendredi 12 février 2021 15:29 À : users@qpid.apache.org Cc : VARSHNEY 
> Prerna <prerna.varsh...@soprasteria.com> Objet : Re: 
> [RABBITMQ/QPID-JMS/VHOST] failed to connect to a virtual host
>
> So, I think what you are seeing here is essentially a bug in the 
> RabbtMQ AMQP 1.0 plugin.  IIRC (and it's been a while) they 
> incorrectly assume an equivalence between the notion of terminus 
> durability in AMQP 1.0 and Queue durability in AMQP 0-9-1.
>
> The log message you see:
>
> 2021-02-12 14:50:48.451 [error] <0.21151.0> Channel error on 
> connection <0.21128.0> (127.0.0.1:49982 -> 127.0.0.1:5672, vhost: '/', user:
> 'guest'), channel 2:
> operation queue.declare caused a channel exception precondition_failed:
> inequivalent arg 'durable' for queue 'vval' in vhost '/': received 'false'
> but current is 'true'
>
> is basically from their AMQP 0-9-1 engine and talking about a 
> requirement in AMQP 0-9-1 that when asserting the existence of a queue 
> you must correctly specify whether it is durable or not.  These 
> concepts do not have an equivalent in AMQP 1.0.
>
>  (Terminus durability can be thought of as something like "durable 
> subscriptions" in JMS...  A non-durable terminus (which is what the 
> JMS client creates) does not imply that the queue it is linking to 
> needs to be non-durable - JMS consumers are not normally durable 
> subscriptions, so durability of the terminus is false).  We've let 
> them know about this bug before, but they didn't seem to believe that 
> fixing it was a priority at the time.
>
> -- Rob
>
> On Fri, 12 Feb 2021 at 15:05, KOELMAN Herbert < 
> herbert.koel...@soprasteria.com> wrote:
>
> > I have tried this broker URL setting and it's not working. Can this 
> > be a bug in version :
> >         <dependency>
> >             <groupId>org.apache.qpid</groupId>
> >             <artifactId>qpid-jms-client</artifactId>
> >             <version>0.55.0</version>
> >         </dependency>
> >
> > Java QPID connexion code: JmsConnectionFactory qpidFactory = new 
> > org.apache.qpid.jms.JmsConnectionFactory("amqp://localhost:5672/amqp
> > .v
> > host=test");
> >
> > Rabbit's log:
> > 2021-02-12 14:50:47.650 [info] <0.21096.0> accepting AMQP connection 
> > <0.21096.0> (127.0.0.1:49982 -> 127.0.0.1:5672)
> > 2021-02-12 14:50:48.451 [error] <0.21151.0> Channel error on 
> > connection <0.21128.0> (127.0.0.1:49982 -> 127.0.0.1:5672, vhost: 
> > '/',
> user:
> > 'guest'), channel 2:
> > operation queue.declare caused a channel exception precondition_failed:
> > inequivalent arg 'durable' for queue 'vval' in vhost '/': received
> 'false'
> > but current is 'true'
> > 2021-02-12 14:50:48.452 [warning] <0.21125.0> Closing session for 
> > connection <0.21096.0>:
> > {'v1_0.error',{symbol,<<"amqp:precondition-failed">>},{utf8,<<"PRECO
> > ND
> > ITION_FAILED
> > - inequivalent arg 'durable' for queue 'vval' in vhost '/': received 
> > 'false' but current is 'true'">>},undefined}
> > 2021-02-12 14:50:48.454 [info] <0.21159.0> Closing all channels from 
> > connection '<<"127.0.0.1:49982 -> 127.0.0.1:5672">>' because it has 
> > been closed
> >
> > Rabbit vhosts setup:
> > herbert@centos-001$ sudo rabbitmqctl list_vhosts Listing vhosts ...
> > name
> > /test
> > /
> >
> > herbert@centos-001$ sudo rabbitmqctl list_queues -p /test
> > Timeout: 60.0 seconds ...
> > Listing queues for vhost /test ...
> > name    messages
> > vval    0
> > conf.r  0
> > conf.q  0
> >
> > -----Message d'origine-----
> > De : Rob Godfrey <rob.j.godf...@gmail.com> Envoyé : jeudi 11 février
> > 2021 15:16 À : users@qpid.apache.org Cc : VARSHNEY Prerna 
> > <prerna.varsh...@soprasteria.com> Objet : Re:
> > [RABBITMQ/QPID-JMS/VHOST] failed to connect to a virtual host
> >
> > So, as per the docs at
> >
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fqp
> > id 
> > .apache.org%2Freleases%2Fqpid-jms-0.56.0%2Fdocs%2Findex.html%23amqp-
> > co 
> > nfiguration-options&amp;data=04%7C01%7Cherbert.koelman%40soprasteria
> > .c 
> > om%7C787463dccd014f5de5c608d8cf6295c8%7C8b87af7d86474dc78df45f69a201
> > 1b 
> > b5%7C0%7C0%7C637487369616243274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> > Lj 
> > AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > a=
> > 2Tc%2BdydcvGcvV%2FhPeYX961oRpoSZsiO9hzCIo69gvMo%3D&amp;reserved=0
> > the amqp vhost needs to be set via a URL option rather than putting 
> > the vhost in the path, so I'd assume something like
> >
> > amqp://localhost:5672?amqp.vhost=tst
> >
> > -- Rob
> >
> > On Thu, 11 Feb 2021 at 13:20, KOELMAN Herbert < 
> > herbert.koel...@soprasteria.com> wrote:
> >
> > > We are indeed using AMQP version 1.0.
> > >
> > > Plugin list:
> > > Enabled plugin file: /etc/rabbitmq/enabled_plugins Enabled plugins:
> > >
> > >  * rabbitmq_web_stomp
> > >  * rabbitmq_stomp
> > >  * rabbitmq_amqp1_0
> > >  * amqp10_common
> > >  * rabbitmq_management
> > >  * amqp_client
> > >  * rabbitmq_web_dispatch
> > >  * cowboy
> > >  * cowlib
> > >  * rabbitmq_management_agent
> > >
> > > List of enable listeners
> > > * Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 
> > > and AMQP 1.0
> > >
> > > I had the feeling that this would pair up nicely. When I connect 
> > > my program to the default virtual host (/), all running fine.
> > >
> > >
> > > -----Message d'origine-----
> > > De : Rob Godfrey <rob.j.godf...@gmail.com> Envoyé : jeudi 11 
> > > février
> > > 2021 13:14 À : users@qpid.apache.org Cc : VARSHNEY Prerna 
> > > <prerna.varsh...@soprasteria.com> Objet : Re:
> > > [RABBITMQ/QPID-JMS/VHOST] failed to connect to a virtual host
> > >
> > > Are you enabling AMQP 1.0 support on RabbitMQ via their plugin 
> > > (RabbitMQ does not support AMQP 1.0 by default - see
> > >
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> > rabbitmq.com%2Fprotocols.html&amp;data=04%7C01%7Cherbert.koelman%40s
> > op
> > rasteria.com%7C787463dccd014f5de5c608d8cf6295c8%7C8b87af7d86474dc78d
> > f4 
> > 5f69a2011bb5%7C0%7C0%7C637487369616243274%7CUnknown%7CTWFpbGZsb3d8ey
> > JW 
> > IjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C100
> > 0& 
> > amp;sdata=Mz3Jcr3UhIPULwChOmVzKYk0%2Fin%2Bf%2Fm2%2FsQ8SV4WZq8%3D&amp
> > ;r
> > eserved=0
> > ).
> > > The Qpid JMS client uses AMQP
> > > 1.0 only.
> > >
> > > -- Rob
> > >
> > > On Thu, 11 Feb 2021 at 13:06, KOELMAN Herbert < 
> > > herbert.koel...@soprasteria.com> wrote:
> > >
> > > > Hello,
> > > >
> > > > I'd like to connect to a RabbitMQ virtual host, but it's not 
> > > > quite clear how I should setup my JMS connection.
> > > >
> > > > I'm using
> > > >
> > > > -          RabbiMQ version 3.8.9
> > > >
> > > > -          Qipid-jms : 0.55.0
> > > >
> > > > I thought it was just a matter of adding the virtual host name 
> > > > at the end of the connection URL. But the magic didn't happen.
> > > >
> > > > To connect with virtual host tst, I use amqp://localhost:5672/tst.
> > > >
> > > > We are using this connection factory class 
> > > > org.apache.qpid.jms.JmsConnectionFactory.
> > > >
> > > > Any idea ?
> > > >
> > > > Regards
> > > >
> > > > Herbert
> > > >
> > > > Il vaut mieux suivre le bon chemin en boitant que le mauvais 
> > > > d'un pas ferme
> > > >
> > > > Saint Augustin
> > > >
> > > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - 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

Reply via email to