Hi Jakub,
I haven't noticed the exchangeQuery in the scenario you describe, but I
had noticed the other week that when sending to a replyTo Destination
the Java client does an exchangeDeclare (I only noticed that because I
was monitoring QMF Events) so I wouldn't be surprised if what you are
saying is indeed the case.
Apparently with the replyTo scenario there is a bug in that it's
*supposed to* (but doesn't) cache, so if multiple replyTos go to the
same address you don't get multiple exchangeDeclares, but I don't see
why there's a need for the exchangeDeclare at all.
I got around it by retrieving the routingKey from the replyTo
destination (I worked out you could do that by casting the Destination
to a Topic and doing getTopicName()) having got the routingKey I used
that as the subject in my reply message. So that sorted out the spurious
exchangeDeclares, but you've now got me wondering what other interesting
things may be lurking :-)
I have noticed that running a very basic Java consumer is no where near
as fast as running a C++ one with equivalent (very basic) functionality,
given the actual client code isn't doing much I wonder if it's just a
general case of Java being slower than C++ or whether there's some
underlying inefficiencies.
Frase.
Jakub Scholz wrote:
Hi,
I'm using a Java program in following scenario:
1) I have an topic exchange named X
2) I have queue named Y
3) I have a binding routing the messages from exchange X to queue Y
4) All objects - exchange, queue and binding - are predefined. They
already exists when a Java client connects to the queue Y and tries to
read a message from the queue. In general it works fine.
But the other day I noticed, that the Java client, after picking up
the message from the queue Y, sends and ExchangeQuery command for the
exchange X to the AMQP broker. That seems strange to me, because I
don't see any reason to do so ...
It is of course not a big issue, but:
1) It seems to be one unnecessary command for every received message
(so it may have some performance impact)
2) The Java client needs to be allowed to query an exchange (in case
strict ACL rules are used)
Why does the Java client (Qpid 0.10) send this request? Is it an error
or is it ok? Can it be swicthed off using some option?
Thanks & Regards
Jakub
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]