From d77c87b969c6eed21d7ae7d3e915bf61e7b03547 Mon Sep 17 00:00:00 2001 From: RJ Nowling <130711295+rnowling-memphis@users.noreply.github.com> Date: Tue, 25 Jul 2023 21:38:26 -0500 Subject: [PATCH] Add comment about new vs old user styles --- memphis/memphis.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/memphis/memphis.py b/memphis/memphis.py index 121d625..b823421 100644 --- a/memphis/memphis.py +++ b/memphis/memphis.py @@ -99,6 +99,11 @@ async def error_cb(e): ping_connection_opts["allow_reconnect"] = False ping_connection_opts["error_cb"] = ping_error_cb + # Newer versions of Memphis take a user of the form + # "{username}${account_id}". For older versions, the user was + # simply the username. The user is created using the new style + # in Memphis.connect(). If connecting with the new-style user + # fails, try the old style. try: conn = await broker.connect(**ping_connection_opts) await conn.close()