servicebus

Azure PowerShell - Object reference not set to an instance of an object

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 13:09:13
问题 I'm trying to write a PowerShell script to automate EventHub creation using Azure PowerShell. I am following the documentation outlined here and have installed the Azure PowerShell module (v 1.0.3). I have added the Microsoft ServiceBus library (v3.0) using the following $scriptPath = Split-Path -parent $PSCommandPath $dllPath = "$scriptPath\..\..\packages\WindowsAzure.ServiceBus.3.1.2\lib\net45-full\Microsoft.ServiceBus.dll" Add-Type -Path $dllPath But as soon as I try and use the Get

Azure Service Bus Topic Timeout exception

旧街凉风 提交于 2019-12-11 12:31:19
问题 I am building a POC for Azure Service Bus Topics using the code given on this blog post: http://blogs.msdn.com/b/tomholl/archive/2011/10/09/using-service-bus-topics-and-subscriptions-with-wcf.aspx However, I am getting following error. System.TimeoutException: The request has timed out after 00:00:00 milliseconds. The successful completion of the request cannot be determined. Additional queries should be made to determine whether or not the operation has succeeded. I have done everything as

Azure, SubscriptionClient.OnMessage, and Sessions

笑着哭i 提交于 2019-12-11 10:52:10
问题 Does the Azure Service Bus Subscription client support the ability to use OnMessage Action when the subscription requires a session? I have a subscription, called "TestSubscription". It requires a sessionId and contains multipart data that is tied together by a SessionId. if (!namespaceManager.SubscriptionExists("TestTopic", "Export")) { var testRule = new RuleDescription { Filter = new SqlFilter(@"(Action='Export')"), Name = "Export" }; var subDesc = new SubscriptionDescription(

Error when sending or listening, Azure ServiceBus

点点圈 提交于 2019-12-11 10:45:13
问题 I have a client that sending and listening on a topic in Azure ServiceBus. The client is running locally on my Windows 8.1 machine. But I got following exception on SendAsync and ReceiveAsync: A first chance exception of type 'System.InvalidOperationException' occurred in System.dll Additional information: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly. The code looks like this: string connectionString = CloudConfigurationManager.GetSetting(

Is there a way I can delay the retry for a service bus message in an Azure function?

霸气de小男生 提交于 2019-12-11 08:35:59
问题 I have a function which pulls messages off a subscription, and forwards them to an HTTP endpoint. If the endpoint is unavailable, an exception is thrown. When this happens, I would like to delay the next attempt of that specific message for a certain amount of time, e.g. 15 minutes. So far, I have found the following solutions: Catch the exception, sleep, then throw. This is a terrible solution, as I will be charged for CPU usage while it is sleeping, and it will affect the throughput of the

Using Windows Azure Service Bus be used from an Azure Web Site?

不羁岁月 提交于 2019-12-11 06:32:04
问题 This guide to using Service Bus says the first step is to create a Service Namespace. I don't see how to do this in the portal for Azure Web Sites. The UI doesn't match the instructions given. I'm wondering if these instructions were written for Web Roles and don't work for Web Sites. Is there another way to do this from a Web Site? 回答1: When viewing the new Windows Azure portal, move your mouse over the word "Preview" in the topmost navigation bar. A dialog should appear. When it does, click

Implementing Exponential Retry policy for ServiceBusTransientErrorDetectionStrategy

纵饮孤独 提交于 2019-12-11 02:24:52
问题 I am trying to implement Retry Policy for Service Bus transient error. I want my system to try exponentially like 1s, 2s, 4s, 8s, 16s, 32s, 64s, 128s. private int minBackoffDelayInMilliseconds = 2000; private int maxBackoffDelayInMilliseconds = 10000; private int deltaBackoffInMilliseconds = 2000; var defaultPolicy = new RetryPolicy<ServiceBusTransientErrorDetectionStrategy>(new ExponentialBackoff(maxRetries, TimeSpan.FromMilliseconds(minBackoffDelayInMilliseconds), TimeSpan.FromMilliseconds

Mass Transit: ensure message processing order when there are different message types

我们两清 提交于 2019-12-11 02:22:20
问题 I'm new to Mass Transit and I would like to understand if it can helps with my scenario. I'm building a sample application implemented with a CQRS event sourcing architecture and I need a service bus in order to dispatch the events created by the command stack to the query stack denormalizers. Let's suppose of having a single aggregate in our domain, let's call it Photo , and two different domain events: PhotoUploaded and PhotoArchived . Given this scenario, we have two different message

MessageReceiver.ReceiveBatch() not working as intended

筅森魡賤 提交于 2019-12-10 20:53:15
问题 I am trying to receive messages in batch from the ServiceBus using the ReceiveBatch method in the MessageReceiver: IEnumerable<BrokeredMessage> messages; var messagingfactory = MessagingFactory.CreateFromConnectionString("ConnectionString"); var msgrcvr = messagingfactory.CreateMessageReceiver("queueName", ReceiveMode.ReceiveAndDelete); messages = msgrcvr.ReceiveBatch(20, timeoutInSecs); I have checked that my queue contains 20 messages using the Service Bus Explorer. This code returns only

How to change async method call to prevent forcing async up the call stack

本秂侑毒 提交于 2019-12-10 19:27:08
问题 If I need to call a method that in turn calls some async method internally, as a fire and forget operation, how can I prevent this call from forcing the "async" to need to be used up the call stack to say...an MVC controller? For example: My MVC Controller (not async) calls a business layer method, which in turn calls the Windows Azure Service Bus QueueClient.SendAsync(BrokeredMessage), to drop a message in a queue, but doesn't need to wait for it to complete. Typically, when this controller