Replies: 1 comment 1 reply
-
Yes it's normal. 🙂
Here's how to work with topic-based routing (a.k.a. "pub/sub") with Rebus. (1) First you start all the "participants", i.e. a Rebus instance for each system that should be involved in the communication. Each of them must have its own input queue. (2) Then you ensure that someone subscribes to something: await bus.Subscribe<SomethingInterestingHappened>(); This will create a topic called "SomethingInterestingHappened" (not exactly that, though, because by default there will be more info in it). When that is done, the topic will have a binding to the subscriber's input queue. This is materialized by Rebus in Azure Service Bus concepts by creating a "subscription" beneath the topic, which will be configured to forward events from the topic to the subscriber's input queue. (3) Last, start publishing events. Any participant can now await bus.Publish(new SomethingInterestingHappened(...)); and a copy will be received by each participant that has subscribed. That's how pub/sub messaging works with Rebus. Btw. you'll only need endpoint mappings when you want to I hope that makes it clearer 🙂 You can also read about it here: https://github.com/rebus-org/Rebus/wiki/Routing |
Beta Was this translation helpful? Give feedback.
-
Hello !!
Surely I am misunderstanding some concept of the bookstore.
I'm trying to make a simple example where my system connects to a queue and a topic. I manage to connect to the queue, and receive the message (The queue is even created automatically and another queue called "error", its normal?). But the topic is neither created and nor works.
In my IoC I have this implemented:
In my test controller I have this implemented:
When I execute the Action of the controller, a topic is created with an ugly name but never I received the message: webapplication2~webapplication2.messaging.usercreatedtopicevent
Can any kind soul give me some light?
Beta Was this translation helpful? Give feedback.
All reactions