Several questions about utilizing the power of NServiceBus with a no or low-code solution

I have a couple of questions after reaching out before about the use of NServiceBus in an environment that doesn’t require code to put a message on the servicebus.

First of all I was happy to hear that it is indeed possible to do this in our solution. Let me sketch you a bit of what we will want to do.

Our client is making use of another party for hosting the solution in Azure. They work with your product, mostly for using the nice logging and tracing capabilities that you have in the form of ServicePulse and ServiceInsight. They showed us how they worked with that and that scared us for a second, as we saw lots of code that felt that for the amount of different implementations that we will do, it would cause a lot of repetition.

What we want to use, is Logic Apps that get information from one system whenever another system requires it by letting the target system ask for the information. Basically the Logic App gets the request for information and puts a message on the ServiceBus in a topic that the source system is subscribed to. The source system replies with the information through another Logic App that puts the message back on the ServiceBus in a topic that the target system is subscribed to.

We will have a couple of those and because of this I have the following questions:

  • How do we need to structure a message on the ServiceBus, in order for NServiceBus to understand that it has to pick it up? Message properties or headers that have to be set for this basically.
  • How does Endpoint Configuration work for messages that have been sent directly to the ServiceBus? ServicePulse shows its monitoring based on Endpoints if I understand correctly.
  • Can NServiceBus monitor several ServiceBus instances at the same time?

I hope my questions are clear, the matter is getting a little urgent as it is key to our implementation of a solution that is quite time sensitive.

Hi

Here’s a page that lists all the headers used by NServiceBus. There is a lot of them but neither is mandatory i.e. NServiceBus can process a message that contains no headers at all. Some of them are, however, very useful for tracing and monitoring. Here’s a list of some of the notable ones:

Other headers allow to build more complex message interaction patterns e.g. request-reply:

  • MessageId allows the receiver to correlate a given message to other messages. If this header is not present, a value provided by the transport is used
  • RelatedTo when you are replying to a message, the MessageID of the original message (request) gets copied to this header
  • ReplyToAddress allows you application to speficy to which queue replies to your messages should be delivered

Here’s a doco page on native integration with NServiceBus using Azure ServiceBus.

Hope it helps

So basically from what you tell me, if I understood correctly:

  • No headers are required to make NServiceBus understand that the message has to be picked up.
  • OriginationEndpoint is the header that defines the name of an application or whatever sets the message on the queue, so that NServiceBus can structure them nicely in ServicePulse?

If that is true, that makes my questions seem rather simple. :wink: Only question you didn’t say anything about is monitoring several instances. Do you have an answer on that?

Kind regards!

@Max_Davidse TimeSent would also be nice because then SP Monitoring can draw diagrams based on the time it took a message to be delivered and processed.

A single NServiceBus endpoint is always tied to a single ServiceBus namespace so if you want to receive messages from multiple namespaces you can set up multiple NServiceBus endpoints. Alternatively, you can try using NServiceBus.Router to route messages from all source ServiceBus namespaces to one destination namespace to which an NServiceBus processing endpoint is bound.

I will take the TimeSent definitely into consideration and sounds to me like NServiceBus.Router is the way to go for us.

Thank you in advance, I do expect we will come back to you later when we are implementing.

Kind regards!

I have one more simple question to which I think I know the answer but I want to be sure. Timezones, are in UTC also in NServiceBus? Would assume so, but need to be certain.

Yes, that’s correct.