Access event metadata via WampEventContext
When a method is triggered by a WAMP event, you can use
WampEventContext.Current to retrieve metadata about the event, such as the PublicationId and EventDetails (which includes the publisher and the topic URI).public class MySubscriber
{
[WampTopic("com.myapp.topic1")]
public void OnTopic1(int counter)
{
WampEventContext context = WampEventContext.Current;
Console.WriteLine("Got event, publication ID {0}, publisher {1}: {2}",
context.PublicationId,
context.EventDetails.Publisher,
counter);
}
}