Publisher Identification¶
Generally, PubSub is used to decouple publishers and subscribers. Publishers do not have any knowledge of subscribers and vice versa.
Depending on your app design, it may be useful however for a subscriber to know the identity of a publisher.
In the Crossbar.io Config¶
Disclosure of caller identity can be configured as part of the Crossbar.io config, e.g.
"roles": [
{
"name": "anonymous",
"permissions": [
{
"uri": "",
"match": "prefix",
"allow": {
"call": true,
"register": true,
"publish": true,
"subscribe": true
},
"disclose": {
"caller": true,
"publisher": true
}
}
]
}
]
In the above example, the identity for publishers which have the role
anonymous
is diclosed to all subscribers. Limiting this to specific
URIs or URI patterns works just like for other permissions.
We provide a full working example.