I am developing a system to support receipt of status information from a variety of hardware types. Each piece of hardware is reporting the same status information (Latitude, Longitude), but each hardware type uses a unique protocol for reporting this information. For this reason I have multiple services, one for each device type, that listen for and parse the protocol of that device. I would like for each of these services to publish the status information using a common message:
public interface IPositionMessage : IMessage
{
string UnitName { get; set; }
double Latitude { get; set; }
double Longitude { get; set; }
}
I had no trouble setting up my first service, but now that I am setting up my second service I'm finding that my subscribers are unable to subscribe to the same message from multiple publishers.
In a similar question on the NServiceBus yahoo group, the recommended solution is to convert the common message to a command and use Bus.Send rather than Bus.Publish. I don't feel that makes sense in this scenario since what is really happening is an event (the unit has already arrived at a position and is reporting the new position). If I were to convert this to a command I would need to know in advance all of the potential subscribers to this event, which I don't. Another possible solution would be to create an aggregation/re-publisher that each service would Bus.Send to, and then the message would be republished from a single publisher. This seems like an unnecessary bottleneck.
Is there any method to allow for subscribers to subscribe to the same message from multiple publishers?