I'm working on a feature for Dispatch Router that will allow it to
intermediate between clients and brokers. This raises a question about
how Proton Messenger handles targets and sources in links.
Consider a subscriber using Messenger:
from proton import Messenger
M = Messenger()
sub = M.subscribe("amqp://0.0.0.0/name")
The resulting incoming link (from Messenger's perspective) has a source
of "name" and a target of "name".
The above code can have two meanings: "I am a service called 'name' and
I wish to begin receiving messages" or "I wish to receive messages from
a node called 'name'".
As I understand it, the first meaning should be indicated by setting the
target and the second meaning by setting the source. Since both source
and target are set, the intent of the node is ambiguous.
From an API perspective, how should a Messenger program indicate which
flavor of subscription it is establishing?