To follow up on Tims reply, that setting prefetch 0 seems to be what
you want, you should also just remove the jms.receiveLocalOnly and
jms.receiveNoWaitLocalOnly options. You would just be setting them to
their existing default value of false.
The local data structure always gets used to source messages to pass
to the application, those settings only govern what happens after it
doesn't yield a message for a receive call, i.e whether remote
operations then occur to really ensure nothing is available or was
in-flight. Those settings also have no bearing on whether prefetch
occurs, thats what the prefetch settings control. Setting a prefetch
of 0 also requires that remote operations always occur during receive
calls.
On Wed, 6 Jan 2021 at 20:38, jxz024000 <
[hidden email]> 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
>
>
>
> --
> Sent from:
http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
[hidden email]
> For additional commands, e-mail:
[hidden email]
>
---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]