NServiceBus and Generic Event Types

606 views Asked by At

I am doing some work using the NCQRS frameworks and NServiceBus 3.3.4. I have been struggling with getting some subscriptions to fire and as far as I can tell all my config is 100% correct.

After some digging I noticed that the MessageType name saved in the subscription document in Raven DB looks a bit odd. The NCQRS framework wraps the domain event in a generic typed named EventMessage'1. Now when that message is saved in the scubscription store it seems to chop off part of the name, see below:

Ncqrs.Nsb.EventMessage`1[[Platform.Events.Category.CategoryRemoved, Version=1.0.0.0

Where I would expect the name to be more along the lines of this:

Ncqrs.Nsb.EventMessage`1[[Platform.Events.Category.CategoryRemoved, Version=1.0.0.0]]

At the very least.

Could this be a bug or am I doing something wrong? My subscriptions in the app.config appear as follows:

  <add Messages="Ncqrs.NServiceBus.EventMessage`1[[Platform.Events.Category.CategoryRemoved, Platform.Events]], Ncqrs.NServiceBus" Endpoint="core.platform.domain" />

It's making me crazy!

1

There are 1 answers

2
Andreas Öhlund On BEST ANSWER

This is not a bug, NServiceBus won't support this since we want to push you into using more explicit message contracts. Perhaps there is a way to configure NCQRS not to require that "EventMessage" thingy?