diff --git a/oslo/messaging/_drivers/impl_qpid.py b/oslo/messaging/_drivers/impl_qpid.py
index f8984da22..421c24182 100644
--- a/oslo/messaging/_drivers/impl_qpid.py
+++ b/oslo/messaging/_drivers/impl_qpid.py
@@ -478,6 +478,9 @@ class Connection(object):
                 hostname, port = netutils.parse_host_port(
                     adr, default_port=5672)
 
+                if ':' in hostname:
+                    hostname = '[' + hostname + ']'
+
                 params = {
                     'host': '%s:%d' % (hostname, port),
                     'username': self.conf.qpid_username,