On 1/6/21 3:37 PM, jxz024000 wrote:
Hello,

We are using qpid-jms-client 0.46.0 with Azure Service Bus. We use a poll
loop to receive and process messages. In Service Bus we have message lock
timeout default to 30 seconds. The message processing logic can vary in
time. Sometimes it can take more than much longer than 30 seconds to
complete. If prefetch is enabled (by default), it is possible the prefetched
message is unlocked on Service Bus side before the message is actually being
picked up by consumer. We would like to only receive one message when call
session.receive and no prefetch. In this case, we also don't need local
message buffer to hold the prefetched messages. Can we disable prefetch and
local message buffer? I checked the document here
https://qpid.apache.org/releases/qpid-jms-0.41.0/docs/index.html.
Should we just need to add the following to connection string?

jms.prefetchPolicy.all = 0
jms.receiveLocalOnly = false
jms.receiveNoWaitLocalOnly = false

amqps://xxx.servicebus.windows.net?amqp.idleTimeout=24000&jms.prefetchPolicy.all=0&jms.receiveLocalOnly=false&jms.receiveNoWaitLocalOnly
= false&transport.enabledProtocols=TLSv1.2

Setting a zero prefetch means that the client will request a message on each call to receive or if setting a MessageListener the client will request one at a time as it calls the onMessage and that method returns.





--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--
Tim Bish


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to