Replies: 1 comment
-
found the answers myself. Correct me if I'm wrong
bus.Advanced.Topics.Publish(message.Key.ToTopicName(), message)
public class DataPipe(IBusRegistry busRegistry) : IDataPipe
{
private IBus_bus = busRegistry.GetBus("data").Advanced.Topics;
public Task Publish(ProcessData data, IDictionary<string, string>? headers = default) =>
_bus.Publish(data.Key.ToTopicName(), data, headers);
public Task Subscribe(DataKey key) =>
_bus.Subscribe(key.ToTopicName());
public Task Unsubscribe(DataKey key) =>
_bus.Unsubscribe(key.ToTopicName());
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I'm evaluating the message bus libs to replace our in-house implementation. We have 3 kinds of data. 2 of them are perfectly covered by one Rebus bus instance
But the third one, the data, is a little bit different. It is subscribed by data key, which is a part of the message and has performance requirements. So my current solution is to create a second bus. They should use the same transport type (rabbitmq with different exchange names)
IRouter
to create topics from property values, and not from type names? There is only one message type in this case.IBus
to publish and subscribe to all message types - events, commands, and data. I found out how I could change the rabbitmq exchange and queue names to make a difference between the two buses. But I can't figure out how the routing should work in case of multiple buses. How does the rebus decide, which bus to send to or receive from? Can they have a different routers?Beta Was this translation helpful? Give feedback.
All reactions