Mouk
Mouk

Reputation: 1737

Subscribing to a message from multiple publisher in nServiceBus

I wonder if it’s possible using nServiceBus to subscribe to all Messages of a Type without specifying the publisher’s end point.

The Background for this, is a distributed algorithm, that uses the distributor infra structure of nServiceBus to delegate sub problems to distributed workers on the network.

After a task is finished, the worker should send a message to notifying the sender.

I could use IBus.Reply() to notify it but I have also some monitoring and logging services, which are also interested in those messages. Making the sender republish all received replied doesn’t sound right.

Can I subscribe to a message from multiple publisher in nServiceBus?

Upvotes: 2

Views: 1420

Answers (1)

Udi Dahan
Udi Dahan

Reputation: 12057

You're exactly right to use Reply - simple and works.

In order to do logging/monitoring, you can audit messages so each endpoint forwards the messages it receives.

Upvotes: 11

Related Questions