azure-servicebus-topics

Is Azure Service TopicClient Thread Safe & Reusable?

旧巷老猫 提交于 2019-12-12 11:18:07
问题 We are using Azure SDK to publish message to Service Bus. In Web API call we're doing these tasks repeatedly for each incoming request MessagingFactory factory = MessagingFactory.CreateFromConnectionString(conStr); factory.RetryPolicy = new RetryExponential(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(2), 3); var namespaceManager = NamespaceManager.CreateFromConnectionString(conStr); TopicClient topicClient = factory.CreateTopicClient(topicName); Can topicClient be converted into Singleton &

How to receive JSON object from the azure service bus topic subscriptions

余生颓废 提交于 2019-12-12 06:38:45
问题 I have doubt about to implement azure service bus receive messages from topic subscriptions. We are using multiple applications in our organization and we need to share data between one to other subsystems so that we are using azure service bus. Here one of my application has sent a message frequently to the service bus topic subscription. Whenever a new user account is created in our application every time the user profile data will be sending the data to the corresponding service bus topic

how to peek and delete a message from deadletter in azureservicebus

左心房为你撑大大i 提交于 2019-12-12 02:56:33
问题 I have created an azure service bus topic application which peek all messages in deadletter . Some specific messages(with particular messageid) which i peeked need to be removed from the deadletter queue. Please provide help for implementing this. 回答1: By calling complete on the reference to the brokered message you receive from the dead letter queue you can remove it from the dead letter queue. https://msdn.microsoft.com/library/azure/microsoft.servicebus.messaging.brokeredmessage.complete

How to configure Rebus to have topics based on handlers' type

别等时光非礼了梦想. 提交于 2019-12-11 11:46:11
问题 I'm using Rebus and I want to introduce something like described in CQRS Journey at paragraph " Avoid processing events multiple times ", but I cannot figure it out. I configured Rebus to use SQL Server for Transport and MongoDB for Subscriptions and Sagas . The Routing is configured TypeBased and maps all the commands handlers' types to the queue configured in Transport . var bus = Configure.With(new SimpleInjectorContainerAdapter(container)) .Logging(l => l.Trace()) .Transport(t => { t

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

Adding messages to IAsyncCollector Topic output with a session ID

狂风中的少年 提交于 2019-12-11 08:02:57
问题 Is it currently possible to push messages to an IAsyncCollector Topic output from Azure functions and also set a session ID? My topics really on FIFO ordering and so we had to setup sessions. Because of this we had imagined just setting up a Guid to be the unique session id. I know how I would push messages to my topic through this output but of course that errors out since we aren't setting the session Id explicitly. Is it possible to set this somewhere in the code as we send it off to the

AMQP Message Null when using Azure IoTHub Routing

怎甘沉沦 提交于 2019-12-11 05:35:16
问题 I have a custom Endpoint + Route setup based on TwinChangeEvent in Azure IoT Hub. I'm routing the events to a Service Bus Queue (tried topic also). I'm using Java Service Bus SDK (azure-servicebus-1.1.0.jar) to pull messages off of the queue. However, I keep getting a NullPointerException in com.microsoft.azure.servicebusMessageConverter on line 124 "brokeredMessage.setMessageId(amqpMessage.getMessageId().toString());" The messageId property seems to be getting lost during the routing. Any

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

Calling .Complete or .DeadLetter on BrokeredMessage with Azure Functions ServiceBus triggered functions

时间秒杀一切 提交于 2019-12-11 00:55:30
问题 I'm working with a Service Bus queue triggered function. When we manually ( and crucially immediately ) DeadLetter the BrokeredMessage, it does indeed go to the dead letter queue. However, the runtime reports the following error: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue Example function: [FunctionName("MySbFunction")] public static async Task Run( [ServiceBusTrigger("topic-name", "subscription-name", AccessRights.Manage,

Send message from an Azure ServiceBus Topic after a specific delay with node.js

帅比萌擦擦* 提交于 2019-12-11 00:42:42
问题 Basically, within an Azure Service Bus, I have a topic and a subscription. If a message arrives in the topic between 11:00AM, my subscriber should not handle it yet. However, at 14:00PM, I would expect my subscriber to treat it. Is there a way to achieve this natively with Topic filters? I don't find any mention of this kind of use case in the official documentation regarding filters. Indeed, all presented samples are about: " subscriber handling this kind of message, or never ". I'm looking