I agree this is not a bug. However, what mode would you recommend using? and what are the advantages and disadvantages of each mode? Adel
> Subject: Re: [qpid-dispatch] No load balancing if destination is available on > 2 brokers > To: users@qpid.apache.org > From: tr...@redhat.com > Date: Tue, 24 May 2016 11:04:03 -0400 > > Adel, > > Ganesh just reproduced your symptom. The issue is that your sender is > synchronous. The send call blocks until the sent message is settled. > Because of this, when a message is delivered to the router, there are no > unsettled deliveries on either router so it picks the first one as the > destination. I claim that this is not a bug. > > To better demonstrate balanced delivery, you can try running multiple > senders at the same time, or use an asynchronous delivery mode so there > are multiple deliveries in-flight at the same time. > > -Ted > > > On 05/24/2016 10:58 AM, Adel Boutros wrote: > > Hello Ted, > > Could it be related to AMQP 1.0? > > It worked for me using simple_send.py. Whereas using JMS and another python > > script, I have the issue. > > python send script attached (./sender.py -b amqp://localhost:10400 -a > > cluster.queue -m 100) > > Regards,Adel > > > >> From: adelbout...@live.com > >> To: users@qpid.apache.org > >> Subject: RE: [qpid-dispatch] No load balancing if destination is available > >> on 2 brokers > >> Date: Tue, 24 May 2016 14:37:52 +0200 > >> > >> Typo: Replace "green-lx-slave1" with "localhost" > >> > >>> From: adelbout...@live.com > >>> To: users@qpid.apache.org > >>> Subject: RE: [qpid-dispatch] No load balancing if destination is > >>> available on 2 brokers > >>> Date: Tue, 24 May 2016 14:36:50 +0200 > >>> > >>> I am using the JMS client version 0.8.0ConnectionFactory > >>> connectionFactory = new > >>> JmsConnectionFactory("amqp://green-lx-slave1:10400"); > >>> Connection connection = connectionFactory.createConnection(); > >>> > >>> try { > >>> //Create producer on Dispatcher > >>> connection.start(); > >>> Session session = connection.createSession(false, > >>> Session.AUTO_ACKNOWLEDGE); > >>> Queue queue = session.createQueue("cluster.queue"); > >>> MessageProducer producer = session.createProducer(queue); > >>> > >>> //Send message > >>> for (int i = 0; i < 500; ++i) { > >>> TextMessage textMessage = session.createTextMessage("Hello > >>> world"); > >>> producer.send(textMessage); > >>> } > >>> > >>> } finally { > >>> //Close connections > >>> producer.close(); > >>> }Regards,Adel > >>>> Subject: Re: [qpid-dispatch] No load balancing if destination is > >>>> available on 2 brokers > >>>> To: users@qpid.apache.org > >>>> From: tr...@redhat.com > >>>> Date: Tue, 24 May 2016 08:26:59 -0400 > >>>> > >>>> Adel, > >>>> > >>>> How are you sending the messages? In my test, I used simple_send.py to > >>>> send 500 messages. It looks like you've got everything set up correctly. > >>>> > >>>> -Ted > >>>> > >>>> On 05/24/2016 08:03 AM, Adel Boutros wrote: > >>>>> *a/fter the autolinks are activated/* > >>>>> *qdstat -a* > >>>>> Router Addresses > >>>>> class addr phs distrib in-proc local remote > >>>>> cntnr in out thru to-proc from-proc > >>>>> > >>>>> ================================================================================================================= > >>>>> local $_management_internal closest 1 0 0 > >>>>> 0 > >>>>> 0 0 0 5 5 > >>>>> local $displayname closest 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> mobile $management 0 closest 1 0 0 > >>>>> 0 > >>>>> 16 0 0 16 0 > >>>>> local $management closest 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> mobile cluster.queue 1 balanced 0 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> mobile cluster.queue 0 balanced 0 2 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> local qdhello flood 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 3 > >>>>> local qdrouter flood 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> topo qdrouter flood 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 5 > >>>>> local qdrouter.ma multicast 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> topo qdrouter.ma multicast 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 1 > >>>>> local temp.cMDIgz6YT1MOtQh closest 0 1 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> > >>>>> *qdstat -l* > >>>>> Router Links > >>>>> type dir conn id id peer class addr phs > >>>>> cap > >>>>> undel unsettled deliveries admin oper > >>>>> > >>>>> ======================================================================================================================= > >>>>> endpoint in 8 19 mobile cluster.queue 1 > >>>>> 250 > >>>>> 0 0 0 enabled up > >>>>> endpoint out 8 23 mobile cluster.queue 0 > >>>>> 250 > >>>>> 0 0 0 enabled up > >>>>> endpoint in 15 35 mobile cluster.queue 1 > >>>>> 250 > >>>>> 0 0 0 enabled up > >>>>> endpoint out 15 39 mobile cluster.queue 0 > >>>>> 250 > >>>>> 0 0 0 enabled up > >>>>> endpoint in 19 42 mobile $management 0 > >>>>> 250 > >>>>> 0 0 1 enabled up > >>>>> endpoint out 19 43 local temp.l5S7mNoIVvYZa5Q > >>>>> 250 > >>>>> 0 0 0 enabled up > >>>>> > >>>>> */after the test is run/* > >>>>> *qdstat -a* > >>>>> Router Addresses > >>>>> class addr phs distrib in-proc local remote > >>>>> cntnr in out thru to-proc from-proc > >>>>> > >>>>> ================================================================================================================== > >>>>> local $_management_internal closest 1 0 0 > >>>>> 0 > >>>>> 0 0 0 5 5 > >>>>> local $displayname closest 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> mobile $management 0 closest 1 0 0 > >>>>> 0 > >>>>> 18 0 0 18 0 > >>>>> local $management closest 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> mobile cluster.queue 1 balanced 0 0 0 > >>>>> 0 > >>>>> 500 500 0 0 0 > >>>>> mobile cluster.queue 0 balanced 0 2 0 > >>>>> 0 > >>>>> 500 500 0 0 0 > >>>>> local qdhello flood 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 5 > >>>>> local qdrouter flood 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> topo qdrouter flood 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 10 > >>>>> local qdrouter.ma multicast 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> topo qdrouter.ma multicast 1 0 0 > >>>>> 0 > >>>>> 0 0 0 0 3 > >>>>> local temp.Z5XxqC2eTxXIfxF closest 0 1 0 > >>>>> 0 > >>>>> 0 0 0 0 0 > >>>>> > >>>>> *qdstat -l* > >>>>> Router Links > >>>>> type dir conn id id peer class addr phs > >>>>> cap > >>>>> undel unsettled deliveries admin oper > >>>>> > >>>>> ======================================================================================================================= > >>>>> endpoint in 8 19 mobile cluster.queue 1 > >>>>> 250 > >>>>> 0 0 500 enabled up > >>>>> endpoint out 8 23 mobile cluster.queue 0 > >>>>> 250 > >>>>> 0 0 500 enabled up > >>>>> endpoint in 15 35 mobile cluster.queue 1 > >>>>> 250 > >>>>> 0 0 0 enabled up > >>>>> endpoint out 15 39 mobile cluster.queue 0 > >>>>> 250 > >>>>> 0 0 0 enabled up > >>>>> endpoint in 23 48 mobile $management 0 > >>>>> 250 > >>>>> 0 0 1 enabled up > >>>>> endpoint out 23 49 local temp.kKB_zhktsaZy3zy > >>>>> 250 > >>>>> 0 0 0 enabled up > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> View this message in context: > >>>>> http://qpid.2158936.n2.nabble.com/FW-qpid-dispatch-No-load-balancing-if-destination-is-available-on-2-brokers-tp7644393p7644423.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 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org > For additional commands, e-mail: users-h...@qpid.apache.org >