Your program suggests a misunderstanding of the way Qpid works.

In Qpid (for AMQP protocols 0-8 to 0-10) message producers send messages to Exchanges. The Exchange is then responsible for routing the message to zero or more Queues. The precise details of that routing depend on the exchange type. It is through this mechanism that Qpid supports common messaging topologies (point-to-point, publish/subscribe, fanout etc).

Your use-case requires the use of an instance of a direct exchange (such as the built-in amq.direct).

A direct exchange routes messages to queues based on an exact match between the routing key of the message, and the binding key used to bind the queue to the exchange. A common convention is to bind the queue to the exchange using the name of queue itself as binding key. It appears your program is currently using the string "routing_key" for this purpose, and I suspect will explain the undesired behaviour you observed.

You will find more explanation here:

http://qpid.apache.org/releases/qpid-0.24/java-broker/book/Java-Broker-Concepts-Exchanges.html (Qpid Java Broker documentation - but the concept is shared)

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_MRG/1.1/html/Messaging_User_Guide/chap-Messaging_User_Guide-Exchanges.html (Redhat's MRG docs explain the same concepts with useful diagrams)

The Python Examples (see Qpid website) are a useful reference.

Answer from k-wall on Stack Overflow
🌐
Apache Qpid
qpid.apache.org › releases › qpid-proton-0.37.0 › proton › python › docs › index.html
Qpid Proton Python API Documentation — Qpid Proton Python API 0.37.0 documentation
This object should then be passed to the convenience methods proton.reactor.Container.create_sender() and/or proton.reactor.Container.create_receiver() as needed. The connection class may be found at proton.Connection. The peer that sends messages uses a sender to send messages, which includes the target queue or topic which is to receive the messages.
🌐
Apache Qpid
qpid.apache.org › releases › qpid-proton-0.39.0 › proton › python › docs › tutorial.html
Tutorial — Qpid Proton Python API 0.39.0 documentation
To run the example, you will need to have a broker (or similar) accepting connections on that url either with a queue (or topic) matching the given address or else configured to create such a queue (or topic) dynamically. There is a simple broker.py script included alongside the examples that can be used for this purpose if desired.
🌐
Apache Qpid
qpid.apache.org › releases › qpid-proton-0.38.0 › proton › python › docs › overview.html
API Overview — Qpid Proton Python API 0.38.0 documentation
Qpid Proton Python API 0.38.0 documentation » · API Overview · Messages are transferred between connected peers over ‘links’. At the sending peer the link is called a sender. At the receiving peer it is called a receiver. Messages are sent by senders and received by receivers. Links may have named ‘source’ and ‘target’ addresses (for example to identify the queue from which message were to be received or to which they were to be sent).
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_build_of_apache_qpid_proton_python › 0.40 › pdf › using_qpid_python › Red_Hat_build_of_Apache_Qpid_Proton_Python-0.40-Using_Qpid_Python-en-US.pdf pdf
Red Hat build of Apache Qpid Proton Python 0.40 Using Qpid Python
Table 14.5. Red Hat build of Apache Qpid Proton Python and JMS message types ... CHAPTER 14. INTEROPERABILITY ... AMQ Broker is designed to interoperate with AMQP 1.0 clients. Check the following to ensure the ... Port 5672 in the network firewall is open. The AMQ Broker AMQP acceptor is enabled. See Default acceptor settings. The necessary addresses are configured on the broker. See Addresses, Queues, and Topics.
🌐
Apache Qpid
qpid.apache.org › releases › qpid-proton-0.40.0 › proton › python › docs › tutorial.html
Tutorial — Qpid Proton Python API 0.40.0 documentation
To run the example, you will need to have a broker (or similar) accepting connections on that url either with a queue (or topic) matching the given address or else configured to create such a queue (or topic) dynamically. There is a simple broker.py script included alongside the examples that can be used for this purpose if desired.
🌐
Apache Qpid
qpid.apache.org › releases › qpid-proton-0.37.0 › proton › python › docs › tutorial.html
Tutorial — Qpid Proton Python API 0.37.0 documentation
To run the example, you will need to have a broker (or similar) accepting connections on that url either with a queue (or topic) matching the given address or else configured to create such a queue (or topic) dynamically. There is a simple broker.py script included alongside the examples that can be used for this purpose if desired.
Author: SolaceSamples
Find elsewhere
🌐
Apache Qpid
qpid.apache.org › releases › qpid-proton-0.36.0 › proton › python › docs › tutorial.html
Tutorial — Qpid Proton Python API 0.36.0 documentation
To run the example, you will need to have a broker (or similar) accepting connections on that url either with a queue (or topic) matching the given address or else configured to create such a queue (or topic) dynamically. There is a simple broker.py script included alongside the examples that can be used for this purpose if desired.
🌐
Apache Qpid
qpid.apache.org › releases › qpid-proton-0.39.0 › proton › python › docs › overview.html
API Overview — Qpid Proton Python API 0.39.0 documentation
Qpid Proton Python API 0.39.0 documentation » · API Overview · Messages are transferred between connected peers over ‘links’. At the sending peer the link is called a sender. At the receiving peer it is called a receiver. Messages are sent by senders and received by receivers. Links may have named ‘source’ and ‘target’ addresses (for example to identify the queue from which message were to be received or to which they were to be sent).
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_build_of_apache_qpid_proton_python › 0.40 › html › using_qpid_python › examples
Chapter 4. Examples | Using Qpid Python | Red Hat build of Apache Qpid Proton Python | 0.40 | Red Hat Documentation
This client program connects to a server using <connection-url>, creates a receiver for source <address>, and receives messages until it is terminated or it reaches <count> messages. ... from __future__ import print_function import sys from proton.handlers import MessagingHandler from proton.reactor import Container class ReceiveHandler(MessagingHandler): def __init__(self, conn_url, address, desired): super(ReceiveHandler, self).__init__() self.conn_url = conn_url self.address = address self.desired = desired self.received = 0 def on_start(self, event): conn = event.container.connect(self.con
🌐
Apache Qpid
qpid.apache.org › proton › index.html
Qpid Proton - Apache Qpid™
Qpid Proton is a high-performance, lightweight messaging library. It can be used in the widest range of messaging applications, including brokers, client libraries, routers, bridges, proxies, and more. Proton makes it trivial to integrate with the AMQP 1.0 ecosystem from any platform, environment, or language.
🌐
Google Groups
groups.google.com › g › rabbitmq-users › c › GYhJ4-JaKEs
Reconnect to topic queue via qpid-proton AMQP1.0
February 23, 2022 - we're using RabbitMQ (currently using version 3.9.12) as a messaging broker and connect several clients via AMQP1.0 protocol. Some publisher process is pushing arbitrary messages to several topics. When a client program is connecting to a specific topic, then RabbitMQ is generating a random name for the queue being used for this distinct connection.
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_amq › 6.2 › html › client_connectivity_guide › amqppython
3.4. Python AMQP 1.0 Client API | Client Connectivity Guide | Red Hat AMQ | 6.2 | Red Hat Documentation
You can install Qpid Proton Python client using the command yum install python-qpid-proton The API is event driven and centers on the Container class which provides methods for establishing connections and creating senders and receivers as well as dispatching events to application defined handlers.
🌐
PyPI
pypi.org › project › python-qpid-proton-wheel
python-qpid-proton-wheel · PyPI
This module provides a Python binding to the Proton AMQP messaging toolkit. Qpid Proton is a high-performance, lightweight messaging library. It can be used in the widest range of messaging applications, including brokers, client libraries, routers, bridges, proxies, and more.
🌐
PyPI
pypi.org › project › python-qpid-proton
python-qpid-proton · PyPI
This module provides a Python binding to the Proton AMQP messaging toolkit. Qpid Proton is a high-performance, lightweight messaging library. It can be used in the widest range of messaging applications, including brokers, client libraries, routers, bridges, proxies, and more.
🌐
Kevin Boone
kevinboone.me › amqp-monitor.html
Kevin Boone: Using the Qpid Proton C++ library to create a server for monitoring or telemetry data
May 3, 2022 - Any client that can do AMQP can connect to the server on port 5672 (or whatever is selected), and subscribe to the queue called "load". Here's how to test this using my Java test client, amqutil: $ amqutil subscribe --qpid --destination load --format text \ --host [my server] --port 5672 · For the record, the switch --qpid selects the use of the Qpid JMS library, for communicating using AMQP. Alternatively, here is a code example in Python, which uses the Qpid Proton Python library for AMQP support: