[
https://issues.apache.org/jira/browse/QPIDJMS-563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17489492#comment-17489492
]
Shaan Jayaratna commented on QPIDJMS-563:
-----------------------------------------
Hallo,
thx for the hint. But unfortunately 'failover.reconnectDelay' doesn't help, i
tested it. I think, that it also get resetted, when a new connection is
established. I have attached a simple Maven project that connects to a local
Rabbitmq and uses all the parameter we used so far.
[^rabbitmq-client-with-failover.zip]
We use RabbitMq 3.9.13.
To reproduce the issue you need to create a non-durable queue named testQueue
with a policy as shown in the image.
!rabbitmq-queue-config.png!
At the moment we fixed it for us by including the expression
{code:java}
requests.isEmpty(){code}
at Line 692 in org.apache.qpid.jms.provider.failover.FailoverProvider
{code:java}
if (requestTimeoutTask != null && requests.isEmpty()) {
requestTimeoutTask.cancel(false);
requestTimeoutTask = null;
}{code}
What do you think about it?
Kind Regards
Shaan
> QPID JMS - Failover - endless loop on sending a message with reject outcome
> ---------------------------------------------------------------------------
>
> Key: QPIDJMS-563
> URL: https://issues.apache.org/jira/browse/QPIDJMS-563
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 1.5.0
> Reporter: Thomas Stollenwerk
> Priority: Critical
> Attachments: rabbitmq-client-with-failover.zip,
> rabbitmq-queue-config.png
>
>
> +*Summary:*+
> Having a amqp v1 message which is rejected by the amqp v1 broker results in
> an endless failover loop blocking the JmsMessageProducer.send method.
> +*Expected:*+
> The failover of the qpid jms client tries to connect and send the rejected
> message in a maximum of failover.maxReconnectAttempts.
> +*Actual:*+
> The result of the message send task is not taken into account for counting
> the attempts.
> The JmsMessageProducer.send gets stuck forever.
> # Failover connects to the failover uri and then resets the attempt counter.
> # Sending the message results in REJECT outcome.
> # Failover connects to the next failover uri and then resets the attempt
> counter.
> # Sending the message results in REJECT outcome.
> # ... repeats and does not stop on maxReconnectAttempts.
> +*Code analysis:*+
> *FailoverProvider.java#L1282* already resets the connection attempts with
> *reconnectControl.connectionEstablished()* not waiting for the success of the
> send task, resulting in an endless failover loop.
> +*Background:*+
> In our case we are using RabbitMQ with the amqp v1 plugin. There are
> scenarios where the broker is answering with REJECT outcomes (overflow
> policy, high watermark etc). Right now we cannot use this feature because the
> client is stuck and the RabbitMQ is flooded with reconnects.
> We would be very grateful having a fix.
> Thanks for the good work and best regards
> Thomas
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]