以下文章说可以在队列或订阅上启用自动转发:
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-auto-forwarding
显示的代码使用QueueDescription或SubscriptionDescription,它们在创建新队列或新订阅时使用。
由于这似乎是服务器级功能,我想我可以更新现有队列以配置自动转发到另一个主题或队列。当然,我去了天蓝色的服务巴士门户网站。但是我没有找到在门户网站中设置它的方法。
这是否意味着:
答案 0 :(得分:2)
您可以更新Queue / Subscription说明并通过代码设置转发或使用工具。门户网站不支持它,但Service Bus Explorer(或类似)等工具可以支持它。
答案 1 :(得分:1)
Azure CLI现在支持此功能,例如
const initState = {
items: ShopContent,
addedItems: [],
total: 0
}
const cartReducer = (state = initState, action) => {
// If item is added to cart...
if (action.type === ADD_TO_CART) {
let addedItem = state.items.find(item => item.id === action.id);
let existedItem = state.addedItems.find(item => action.id === item.id);
// Check if item already exists in cart
// If item is already in cart, increase quantity by 1, and calculate total
if (existedItem) {
addedItem.quantity += 1;
return {
...state,
total: state.total + addedItem.price
}
} else {
// Add item to cart and calculate total
addedItem.quantity = 1;
let newTotal = state.total + addedItem.price;
return {
...state,
addedItems: [...state.addedItems, addedItem],
total: newTotal
}
}
}
/* ... the rest of the reducer covers changing quantity of items
in cart and adding/removing shipping from the cart total */
答案 2 :(得分:0)
除了Service Bus Explorer或代码,您还可以查看ServiceBus360,它还支持设置自动转发。