Based on a discussion with Gordon, I'm not going to use source vs.
target to infer any intent on the part of the peer node.
I am, however, still interested in the answer to the question.
-Ted
On 02/21/2014 03:02 PM, Ted Ross wrote:
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()
M.start()
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?
-Ted