qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Langford <danlangf...@gmail.com>
Subject [Java Client JMS] qpid-jms-client 0.22.0 vs qpid-client 6.1.2: prefetch behaving differently
Date Thu, 04 May 2017 22:39:00 GMT
So over the past few weeks we have had a huge influx of messages on our
enterprise message bus (qpid java 6.0.4 serves the AMQP1.0 messaging
portion) and when one of our clients struggled scaling their application up
it got us looking at prefetch. we thought it was odd that all 500k messages
in the queue were prefetched and it was due to the prefetch that when they
scaled out the new connections could help with those messages they could
only acquire new messages.

so i started running tests on a local instance of qpid java 6.1.2 and i was
able to duplicate the behavior which seems odd.

Setup.
my java code will use the JMS api to create a consumer, receiveNoWait a
message, acknowledge or commit the message, then Thread.sleep for a bit to
look at the Qpid Java Brokers web interface for stats around prefetched
messages.

Test 1. qpid-jms-client 0.22.0 with prefetch of 10 set via jms url
parameter (jms.prefetchPolicy.all=10) OR set via PreFetchPolicy on the
ConnectionFactory (jmsDefaultPrefetchPolicy.setAll(10);)
After the first message came in the web interface showed the queue size
decrement and 19 messages pre-fetched
after second message queue size decremented again and 28 messages are
pre-fetched
after third message queue size also decremented and 37 messages prefetched
so on and so forth

Test 2. qpid-client 6.1.2 with prefetch of 10 set via url param
maxprefetch='10'
After the first message came in the web interface showed the queue size
decrement and 10 messages pre-fetched
after second message queue size decremented again and still 10 messages are
pre-fetched
after third message queue size also decremented and still 10 messages
prefetched
so on and so forth

could it be a link credit thing? could i not be understanding prefetch?
maybe jms.prefetchPolicy is not the same as maxprefetch?

Frame logs are here
https://pastebin.com/4NHGCWEa

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message