Comments (12)
Would this allow for a Topic per message type approach? I was considering forking and implementing this myself.
The reason I ask is purely for throughput reasons. For each subscription to a topic, throughput is reduced. See MSDN:
Benchmarks suggest that a single topic with 5 subscriptions can achieve a message throughput of up to 600msg/s >(message size: 1KB) if all messages are routed to all subscriptions. To obtain higher throughput, use multiple >topics.
Benchmarks suggest that a single topic with 250 subscriptions can achieve a message throughput of up to 5msg/s >(message size: 1KB) if all messages are routed to all subscriptions. To obtain higher throughput, use multiple >topics.
In a system with a wide variety of messages and a reasonable number of instances I could see a single Topic approach causing problems.
from projectextensions.azure.servicebus.
The way the current design works, I would need to use a non static version of the "bus" class.
My thoughts would be to create a config and pass it to a method to return a sender.
We could overload the send methods and perform a lookup but there would be a slight overhead with that.
How did you plan on implementing it?
from projectextensions.azure.servicebus.
I would have some sort of sender factory and have a mapper list (like you do for subscriptions) to route messages to their respective sender. Each sender would have it's own TopicClient instance.
I think the receiver side of things could be accomplished pretty much in config. I'm not that familiar with your code base so I might be way off.
from projectextensions.azure.servicebus.
For multiple topics, both the sender and receivers would need to support it. My thought on the receiver side is to have a comma separated string so that I can go and register them to multiple topics.
Do you have psydo code that would show how you see this sender factory?
from projectextensions.azure.servicebus.
Would it not be simpler to have a separate receiver per message type (with its own mappings)? Maybe make it a generic?
My (vague) plan for the sender factory was to use generics and either reflect the class name of the argument or use a hash as you do with subscriptions and attach a TopicClient (or MessageSender) to each sender.
This has the problem in that the end user would have to request a different sender instance for each message type. It is probably more sensible to maintain a collection of TopicClients inside a non-generic Sender and just reflect on the message type to get the route.
from projectextensions.azure.servicebus.
Hey Joe please take a look at the latest commit on my fork for my initial implementation:https://github.com/eltone/ProjectExtensions.Azure.ServiceBus
I realize that this forces the multi-topic decision on the user but I felt it was the simplest way to get a working example. I also still need to ensure these changes are in line with your topic/ subscription recovery work.
If you are happy with this direction I can submit a PR and we can go into more detailed discussion over the diffs.
from projectextensions.azure.servicebus.
I will try to look at it tonight. It may be a day or so. Thanks for the fork.
from projectextensions.azure.servicebus.
I only looked online. Did you make it so that each message is it's own topic? That would mean that the receivers would also need a client per message type.
from projectextensions.azure.servicebus.
Yes the CreateSubscription method handles this by fetching a TopicDescription instance from the dictionary using the type name to pass into the AzureReceiverHelper constructor. Currently the sender and receiver use separate sets of TopicClient instances.
from projectextensions.azure.servicebus.
I think I misunderstood how you wanted to scale out. What if you want to send 5000 msg / s of one message type. The only want to do that is to spin it across multiple topics. The current code you have would not support that.
from projectextensions.azure.servicebus.
I now re-read your original comment so your approach makes sense with the code that you have. What's your thought on the last comment?
from projectextensions.azure.servicebus.
I don't think it would be much work to allow for multiple topics per type:
- This could be either configured globally across all types or by using attributes on the messages themselves.
- Receiving is simple as it just involves creating more AzureReceiverHelper instances.
- Sending of messages could be implemented by using a round robin or RNG based load balancer.
from projectextensions.azure.servicebus.
Related Issues (20)
- Document AppName and the purpose of it
- Document IHandleCompetingMessage<T> compared to IHandleMessage<T>
- Document MessageHandlerConfiguration
- Implement DeadLetterAfterMaxRetries polling for a subscription.
- Add ability to provide additional filters to the subscription HOT 2
- Remove AzureConfigurationHelper
- Document Async and speed of it and why you should use it
- Document what to do if you can't deal with a message
- Limit number of async calls that are in flight
- Deal with throttle exceptions HOT 6
- Strong Name the NuGet package HOT 1
- Support RenewLock and LockUntil
- Add ability to change the filter on a subscription
- Support Scheduled Enqueue Time
- Add support to verify if a subscriber exists
- Correlation Filter and Properties
- Send Batch Support
- Verify we documented the WithSettings Change
- Add support for Service Bus for Windows Server HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from projectextensions.azure.servicebus.