![nservicebus vs masstransit nservicebus vs masstransit](https://www.lambda3.com.br/wp-content/uploads/2019/07/filas_mensageria.jpg)
ProcessEvent(activity, payload as AfterSendMessage)
![nservicebus vs masstransit nservicebus vs masstransit](https://www.eimg.top/images/2020/03/02/ffe5bd04910f63a55fbf7557bfdacc8f.png)
Public override void OnStopActivity(Activity activity, object payload) ProcessEvent(activity, payload as BeforeSendMessage) Public override void OnStartActivity(Activity activity, object payload) Public SendMessageListener(string sourceName, Tracer tracer) : base(sourceName, tracer) For us, we only have start/stop events, so we can create a class that overrides those two methods: internal class SendMessageListener : ListenerHandler That base ListenerHandler class has methods to override - when an Activity starts, stops, raises an exception event, or any other custom event.
![nservicebus vs masstransit nservicebus vs masstransit](https://www.eimg.top/images/2020/03/02/45bb832eeabb636aec21aa82807a5b96.png)
Note: this is all subject to change as it's all alpha, but the primitives defined in the OpenTelemetry Specification are at least in beta. The OpenTelemetry SDK includes a helper for dealing with the Activity/OpenTelemetry bridge, and that's a base ListenerHandler class. That means we'll have two telemetry events, two spans, and two listeners.
#Nservicebus vs masstransit code#
In the last post, we looked at providing diagnostic event hooks into our code at specific points so that "something" could listen in.
![nservicebus vs masstransit nservicebus vs masstransit](https://image.slidesharecdn.com/azurewebinarv2-140828051001-phpapp01/95/cloud-messaging-with-nservicebus-and-microsoft-azure-30-638.jpg)
User-Defined Context with Correlation Context.