[
https://issues.apache.org/jira/browse/QPID-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13907074#comment-13907074
]
ASF subversion and git services commented on QPID-5568:
-------------------------------------------------------
Commit 1570231 from [~aconway] in branch 'qpid/trunk'
[ https://svn.apache.org/r1570231 ]
QPID-5568: HA C++ qpid::messaging AMQP 1.0 client failover logging is not clear
The qpid::messaging AMQP 1.0 protocol logging did not give clear information
about reconnection during failover.
This patch simplifies the reconnect logic by collapsing all known addresses from
broker URL and reconnect URLs into a single URL with no duplicates.
It rationalizes the info and notice logging as follows:
# Initial connection with multiple addresses, info logs show the
# full URL, each attempt to connect and the finally connected address.
[Messaging] info Starting connection to
amqp:tcp:20.0.10.33:5672,tcp:20.0.10.34:5672,tcp:20.0.10.35:5672
[Messaging] info Connecting to tcp:20.0.10.33:5672
[Messaging] info Failed to connect to tcp:20.0.10.33:5672
[Messaging] info Connecting to tcp:20.0.10.34:5672
[Messaging] info Failed to connect to tcp:20.0.10.34:5672
[Messaging] info Connecting to tcp:20.0.10.35:5672
[Messaging] info Connected to tcp:20.0.10.35:5672
# Re-connection due to a failure. notice logs for the start of reconnection
(with full URL)
# and eventual sucess (with individual address). info logs for individual
connection attempts.
[Messaging] notice Auto-reconnecting to
amqp:tcp:20.0.10.33:5672,tcp:20.0.10.34:5672,tcp:20.0.10.35:5672
[Messaging] info Connecting to tcp:20.0.10.33:5672
[Messaging] info Failed to connect to tcp:20.0.10.33:5672
....
[Messaging] info Connected to tcp:20.0.10.33:5672
[Messaging] notice Auto-reconnected to amqp:tcp:20.0.10.33:5672
The idea here is that there are no logs by default (info is not on by default)
for "normal" behavior, but failover does get a (short) notice log by default.
By turning on info logs you can follow the detailed blow-by-blow of failover
without getting drowned in the detail of debug logs.
Note that final failure to connect is signalled to the application via an
exception.
There was not previously any log message for that and I didn't add one.
Additional changes: updated qpid-ping test client to use the messaging library.
> HA C++ qpid::messaging AMQP 1.0 client failover logging is not clear.
> ---------------------------------------------------------------------
>
> Key: QPID-5568
> URL: https://issues.apache.org/jira/browse/QPID-5568
> Project: Qpid
> Issue Type: Bug
> Components: C++ Client
> Affects Versions: 0.27
> Reporter: Alan Conway
> Assignee: Alan Conway
> Fix For: 0.27
>
>
> The qpid::messaging AMQP 1.0 protocol logging does give clear information
> about reconnection during failover. It does not log all reconnect attempts.
> see also
> https://bugzilla.redhat.com/show_bug.cgi?id=1050856
> https://reviews.apache.org/r/17856/
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]