azureservicebus

What is the role of “MaxAutoRenewDuration” in azure service bus?

こ雲淡風輕ζ 提交于 2021-02-20 10:14:58
问题 I'm using Microsoft.Azure.ServiceBus . (doc) I was getting an exception of: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue. By the help of these questions: 1, 2, 3, I am able to avoid the Exception by setting the AutoComplete to false and by increment the Azure's queue lock duration to its max (from 30 seconds to 5 minutes). _queueClient.RegisterMessageHandler(ProcessMessagesAsync, new MessageHandlerOptions

Best practice for sending large messages on ServiceBus

[亡魂溺海] 提交于 2021-02-18 12:22:10
问题 We need to send large messages on ServiceBus Topics. Current size is around 10MB. Our initial take is to save a temporary file in BlobStorage and then send a message with reference to the blob. The file is compressed to save upload time. It works fine. Today I read this article: http://geekswithblogs.net/asmith/archive/2012/04/10/149275.aspx The suggestion there is to split the message in smaller chunks and on the receiving side aggregate them again. I can admit that is a "cleaner approach",

How to move error message to Azure dead letter queue using Java?

拈花ヽ惹草 提交于 2021-02-17 02:50:13
问题 We are using Azure Service Bus Queues for exchanging messages between different systems. We would like to move the invalid messages to Dead Letter Queue using Java code. I am able to move the messages to the Main queue, but not to dead letter queue. I tried to give the queue name as "BasicQueue/$deadletterqueue", but I was getting the error. 回答1: There are many reasons why a message may be automatically moved to the dead letter queue by the Azure Service bus runtime, such as: The max delivery

Using SAS Token with Azure ServiceBus

我与影子孤独终老i 提交于 2021-02-11 16:56:57
问题 I am using new Azure ServiceBus SDK which is .NET Standard 2.0 and I am finding it difficult to use SAS Token. Previously, it used to be MessagingFactory but in new SDK it's not there. ServiceBusConnectionStringBuilder has SAS Token but it also expects a connectionString. Basically, I want to Send and Receive using SAS Policy (Send rule for Sending and Receive rule for Receiving) and SAS token created from connection string of these policies. I am able to generate SAS Token but cannot find a

How to setup ContentType for Azure ServiceBus from Spring JMS

ε祈祈猫儿з 提交于 2021-02-11 12:24:40
问题 I'm trying to use library azure-servicebus-jms-spring-boot-starter to send messages to topic. Everything works, however messages are being stored in subscriptions as application/xml type and I can't find the way how to setup this correctly to have them stored as application/json . I've tried to configure message converter to send ContentType as described here but that doesn't work either. @Bean public MessageConverter jacksonJmsMessageConverter() { final MappingJackson2MessageConverter

Azure Resources Management API. Authorization issue when creating Service Bus Hybrid Connection

非 Y 不嫁゛ 提交于 2021-02-08 11:36:58
问题 We try to use Azure Resources Management API to create a Hybrid Connection. (https://docs.microsoft.com/en-us/rest/api/relay/hybridconnections.) The problem we have is that every time we submit HTTP request it returns us 401 error with message: { "error":{"code":"AuthenticationFailedInvalidHeader","message":"Authentication failed. The 'Authorization' header is provided in an invalid format."}} We prefer to use REST API rather than SDK/nugget packages Here is console app code: using System;

Azure Resources Management API. Authorization issue when creating Service Bus Hybrid Connection

偶尔善良 提交于 2021-02-08 11:35:49
问题 We try to use Azure Resources Management API to create a Hybrid Connection. (https://docs.microsoft.com/en-us/rest/api/relay/hybridconnections.) The problem we have is that every time we submit HTTP request it returns us 401 error with message: { "error":{"code":"AuthenticationFailedInvalidHeader","message":"Authentication failed. The 'Authorization' header is provided in an invalid format."}} We prefer to use REST API rather than SDK/nugget packages Here is console app code: using System;

Shared Access Policy Programatic Creation for Azure Service Bus

时间秒杀一切 提交于 2021-02-08 09:15:28
问题 I need to create/update and delete Shared Access Policy programmatically from my application on an existing Service Bus. I can do that just fine from portal.azure.com but how do I do that programmatically? Is there a rest API for this? I've read through this document but can't seem to make it work. Any help will be highly appreciated, thanks! 回答1: It is possible to create Shared access policy for Azure bus Service queus or topics. Please refer the below link for programmatical implementation

Shared Access Policy Programatic Creation for Azure Service Bus

孤人 提交于 2021-02-08 09:15:23
问题 I need to create/update and delete Shared Access Policy programmatically from my application on an existing Service Bus. I can do that just fine from portal.azure.com but how do I do that programmatically? Is there a rest API for this? I've read through this document but can't seem to make it work. Any help will be highly appreciated, thanks! 回答1: It is possible to create Shared access policy for Azure bus Service queus or topics. Please refer the below link for programmatical implementation

Azure Function Service Bus trigger fires more times than messages in the queue

末鹿安然 提交于 2021-02-05 09:42:58
问题 I have two Service Bus Queues and Azure Service Bus Queue Trigger. The function reads 1000 messages from the queue and forwards them to another (for test) When publishing to Azure (plan consumption) I get 1030+ function hits even though I only have 1000 messages in the queue. I think this has to do with the number of function instances. Q: How to process 1 unique message only once for 1 function instance? Queue message count image [FunctionName("Function1")] public static async Task Run(