使用2012年6月的Azure SDK,我有一个服务总线主题,我正在添加订阅.
我想过滤该订阅.如果我根据我添加到BrokeredMessage Properties包中的一个项目执行此操作,那么这样可以正常工作:
// Send the message:
BrokeredMessage message = new BrokeredMessage(serializableObject);
message.Properties.Add("MySessionId", "GUID");
getTopicClient("MY_TOPIC").Send(message); // method creates client. omitted here.
// Retrieve it:
SqlFilter myFilter = new SqlFilter(@"(MySessionId = ""GUID"")");
namespaceManager.CreateSubscription("MY_TOPIC", "MY_SUB", myFilter);
SubscriptionClient client = getSubscriptionClient("MY_TOPIC", "MY_SUB"); // method creates client. omitted here.
// This will work fine:
Message newMessage = client.Receive();
Run Code Online (Sandbox Code Playgroud)
但是,如果我这样做,但是将过滤器值添加到BrokeredMessage对象的某个直接属性(例如SessionId),则会失败:
// Send the message:
BrokeredMessage message = new BrokeredMessage(serializableObject);
message.SessionId = "GUID";
getTopicClient("MY_TOPIC").Send(message); // method creates client. omitted here.
// Retrieve it:
SqlFilter myFilter …Run Code Online (Sandbox Code Playgroud) 是否可以直接向订阅队列发送消息?
场景:
消息失败,丢失到deadletter,消息已经使用defer手动获取,克隆并需要发送到它首先被破坏的队列,但不是主题.
我可以直接向订阅者发送消息吗?
我考虑过为每个订阅者创建一个单独的重试队列,其中处理服务也将接收来自但我不想这样做的消息.
JBI标准(是?)应该是企业服务总线的标准,特别是在重用/交换不同ESB(或孤独的服务引擎提供商)的功能方面
已知的JBI实现(根据维基百科):
非执行者:
如果不考虑JBI的工作原理,并且它解决了与SCA不同的问题,您是否真的会在ESB选择中考虑它是否符合JBI?还是坚持ESB的能力?
任何人都可以在初级中级层面解释企业服务总线环境中"总线","传输"和"端点"的术语吗?我是一名C#开发人员,现在有几年经验,但只是刚开始使用ESB.
似乎"总线"实际上是一个可以发送和接收消息的队列.我很好.然而,我正在使用NServiceBus处理一些现有的代码,我想如果我理解了"端点"和"传输"术语,我会在我的理解中实现大幅度的飞跃.
我认为标题总结了......我们有一个.NET 2.0系统试图实现分布式发布/订阅模型.我遇到了NServiceBus,RhinoBus和MassTransit.不幸的是,这些是基于MSMQ的.我的任务是找出使用不同消息替代方案的pub/sub替代方案......
寻求MSMQ替代方案的唯一原因是克服消息大小限制.由于每条消息限制,我们的企业应用消息可能会被截断...
任何指导都非常感谢
我有一个问题让我感到困惑的是,服务总线类型,代理消息传递和中继消息传递之间有什么区别?我不是从开发的角度来看它,但我想更多地了解它们之间的概念和差异.
谢谢.
我知道您可以设置重复检测以使用天蓝色服务总线队列在一段时间内工作.但是,是否有人知道这是否基于队列中的对象?
因此,如果我有一个id为"SO_1"的对象被放入队列并随后被消耗,那么重复检测是否仍然有效?
我想我要问的是 - 是时间框架和对象,还是只是让队列决定什么是重复的时间框架?
我想到的场景是:Service Bus用于实例到实例的通信,因此Subscription对每个服务实例都是唯一的.最终结果是,如果实例未正常关闭,则其订阅不会被删除.
当服务实例"死"并重新启动时,订阅的先前内容是不相关的并且可以被丢弃.
那么,有没有办法为Service Bus订阅设置"生存时间"或模拟类似的东西,而不必诉诸一些自定义的孤立检测机制?
嗨,我有一个用于创建带有主题和订阅的ServiceBus的ARM模板。但是我只能完成1个主题-1个订阅,因为我无法进行嵌套循环来为每个主题创建多个订阅。
我希望我可以执行这样的模板:
参数:
{
"serviceBusName": "mybus",
"topics":
[
{
"topicName": "mytopic1",
"subscriptions": [ "mysubscription1", "mysubscription2"]
},
{
"topicName": "mytopic2",
"subscriptions": [ "mysubscription1"]
}
]
}
Run Code Online (Sandbox Code Playgroud)
这是我的实际模板:
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ServiceBusNamespaceName": {
"type": "string"
},
"ServiceBusSku": {
"type": "string",
"allowedValues": [
"Basic",
"Standard"
],
"defaultValue": "Standard"
},
"ServiceBusSmallSizeTopicInMb": {
"type": "int",
"defaultValue": 1024
},
"ServiceBusMaxSizeTopicInMb": {
"type": "int",
"defaultValue": 1024
},
"Topics": {
"type": "array"
}
},
"variables": {
"DefaultSASKeyName": "RootManageSharedAccessKey",
"DefaultAuthRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('ServiceBusNamespaceName'), variables('DefaultSASKeyName'))]",
"SbVersion": "2017-04-01" …Run Code Online (Sandbox Code Playgroud) servicebus azure azureservicebus azure-resource-manager azure-servicebus-topics
Azure Service Bus Queue我正在尝试从我的应用程序访问Windows Service。我正在关注这个样本。
我想Azure Service Bus使用Azure Service Principal 下面是我已实施的步骤来保护它
pc-shutdown-producer代表Azure Ad
我的应用程序Windows Serviceservice bus namespace名为shutdowncomputer Access control (IAM),我添加了Role Assignment以下值
Azure Service Bus Data Ownerpc-shutdown-producer据我所知,上述配置将让pc-shutdown-producer应用程序管理 servicebus 命名空间中的所有资源。4. 除此之外,我还提供了pc-shutdown-producer访问服务总线命名空间的委托 API 权限。
下面是我的 C# 代码。
public async Task Init()
{
string authority = $"https://login.windows.net/{TenantId}";
ITokenProvider tokenProvider = TokenProvider.CreateAzureActiveDirectoryTokenProvider(AuthenticationCallback, authority);
var …Run Code Online (Sandbox Code Playgroud) servicebus azureservicebus azure-servicebus-queues azure-servicebus-topics azure-rbac
servicebus ×10
azure ×6
esb ×2
.net ×1
architecture ×1
azure-rbac ×1
c# ×1
detection ×1
duplicates ×1
jbi ×1
msmq ×1
soa ×1