简体   繁体   English

多租户系统中租户控制队列并发

[英]Control queue concurrency by tenant in multi-tenancy system

I have a multi-tenancy system and need to guarantee FIFO (first-in-first-out) processing of queued messages by tenant, ie each tenant would get its own MaxConcurrentCalls = 1 . 我有一个多租户系统,需要确保租户对排队的消息进行FIFO(先进先出)处理,即每个租户将获得自己的MaxConcurrentCalls = 1

To be done in Azure and technology not fixed. 要在Azure中完成,并且技术不固定。

I know this could be achieved by creating a separate WebJob for each tenant, but that limits scalability. 我知道可以通过为每个租户创建一个单独的WebJob来实现,但这限制了可伸缩性。

Are there any other ways to achieve such a behaviour? 还有其他方法可以实现这种行为吗?

Since you mentioned Service Bus, I suggest 既然您提到服务总线,我建议

  • Use Service Bus Queues or Topics with Sessions enabled 在启用了会话的情况下使用服务总线队列或主题
  • Assign session identifiers based on tenant ID 根据租户ID分配会话标识符

This way you should be able to process messages one-by-one and in-order per tenant, but multiple tenants in parallel. 这样,您应该能够按租户一个一个地,按顺序处理消息,但是可以并行处理多个租户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 多租户:每个租户的单个数据库 - Multi-tenancy: Individual database per tenant 为多租户配置 Razor 页面,使用 IPageRouteModelConvention 和单独的租户页面文件夹 - Configure Razor Pages for multi-tenancy, using IPageRouteModelConvention and separate tenant page folders 虚拟导航属性和多租户 - Virtual Navigation Properties and Multi-Tenancy 实体框架多租户和动态模式 - Entity Framework Multi-Tenancy and dynamic schema 具有过滤的dbContext的多租户Web应用程序 - Multi-tenancy web application with filtered dbContext 具有ASP.NET身份的实体框架多租户 - Entity Framework Multi-Tenancy with ASP.NET Identity 使用 Azure 服务总线重新总线、竞争消费者和多租户 - Rebus with Azure Service Bus, Competing consumers and multi-tenancy 在运行时从子域设置EF ConnectionString以进行多租户设置 - Set EF ConnectionString at runtime from subdomain for multi-tenancy setup EF6 中的多租户具有多个具有相同表的架构 - Multi-tenancy in EF6 with multiple schemas having the same tables 将NHibernate繁重的应用程序从具有多个模式的单租户迁移到多租户 - Moving an NHibernate-heavy application from single-tenancy to multi-tenancy with multiple schemas
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM