0
votes

We are using NSB 5. We have an NSB Endpoint ("BusinessEndpoint") on Server1 and an NSB Audit Endpoint ("AuditEndpoint") on Server2.

"BusinessEndpoint" is configured to send audit messages to "AuditEndpoint" using the following configuration:

<section name="AuditConfig" type="NServiceBus.Config.AuditConfig, NServiceBus.Core" />
...
<AuditConfig QueueName="AuditEndpoint@Server2" />

The AuditEndpoint is set up like so:

public class EndpointConfig : IConfigureThisEndpoint, AsA_Server
{
    public void Customize(BusConfiguration configuration)
    {
        configuration.EndpointName("AuditEndpoint");
        configuration.UseSerialization<JsonSerializer>();
        configuration.UsePersistence<NHibernatePersistence>();

        // stop processing incoming subscription control messages
        configuration.Pipeline.Remove("ProcessSubscriptionRequests");

        var conventions = configuration.Conventions();

        conventions.DefiningMessagesAs(t => t.Namespace != null && t.Namespace.Contains("Messages"));
    }
}
  • Endpoints on Server1 can send normal (non audit) messages to endpoints on Server2 using NServiceBus.
  • Auditing works for all Endpoints installed on the Server2 (the same server as the AuditEndpoint).

However, the AuditEndpoint does not appear to receive any audit messages from the BusinessEndpoint.

Is it possible to Audit across different servers with just one AuditEndpoint?

Thanks for your help.

1

1 Answers

1
votes

From your code it looks like the AuditEndpoint's name is auditingissue (and that is the name of the endpoint's input queue?)

This means the audit messages are being sent to the wrong queue, what sounds wrong is

Auditing works for all Endpoints installed on the Server2 (the same server as the AuditEndpoint).

Can you check that?

Another thing to check is your outgoing queues, in MSMQ's out going queue you should have audit messages stuck trying to be sent to: a. the wrong machine name b. the wrong queue on that machine (server2)

Does that help?