Quantcast
Channel: Service Bus forum
Viewing all 1916 articles
Browse latest View live

How to create custom dead letter queues pertaining to a respective Topic.

$
0
0

We have pub-sub  implementation by using Azure Service Bus.

Please share the best practices and approaches to handle Dead Letter Queue messages.

Kindly also emphasize as to how create customized dead letter queues within azure service bus.

Please provide sample code snippets in order to facilitate better understanding.

Thank you,

Tanveer


QueueClient.Peek returns future/scheduled message instead of next active message

$
0
0

I have a Service Bus Queue with two messages in it:

  • One enqueued 10 minutes ago with a ScheduledEnqueueTimeUtc set to 30 minutes in the future
  • One enqueued 5 minutes ago (for immediate processing)

When I call QueueClient.PeekAsync, I'm getting the first message (the first enqueued message) instead of the second (the next message that will be processed).

Is this the expected behavior of Peek? If so, is there any way to inspect (without removing from the queue) the next message that will be processed?

My scenario is that I'm trying to calculate our queue latency and the queue contains a mix of scheduled/non-scheduled messages. Currently, I'm working around the behavior noted above by calling PeekBatchAsync to retrieve several messages and then I'm sorting them by when I expect the messages to "become visible" (i.e. eligible for processing).

I'm looking for a fully supported solution (or any mistakes in my observations/analysis/logic above).

Thanks!

Getting ServiceBus Namespace description

$
0
0

Hello,

I have a requirement to create service bus namespace using management API. I used

https://msdn.microsoft.com/en-us/library/azure/jj856303.aspx

And was able to do this. But for using this namespace now I need keys, I did find some help

https://msdn.microsoft.com/en-us/library/azure/jj873988.aspx

But not sure how to use this.

Anyone has any idea?

Regards,


Software Engineer

windows service bus Error - The api-version in the query string is not supported.

$
0
0

Hello,

We are getting the following error when we are using the windows service bus for implementing pub-sub model.

The remote server returned an error: (400) Bad Request. The api-version in the query string is not supported. Either remove it from the Uri or use one of '2012-03,2012-08,2013-04,2013-07'..TrackingId:38629632-1d8a-43a5-bd8b-e3bd8c46f244_GGBIPS-I-AP300D,TimeStamp:19/01/2016 09:01:31

We have installed the following packages from Nuget:-

  • Service Bus 1.1 for Windows Server
  • Windows Azure Configuration Manager

Kindly assist us in understanding as to how could this issue be resolved.

Regards,

Tanveer



Communication between ios app and java server in private netwrok.

$
0
0

Hello,

How can I communicate with a java server hosted in private network with a mobile app using azure mobile services.

Graceful shutdown when using RegisterSessionHandler / RegisterSessionHandlerFactory

$
0
0

I have some QueueClient / SubscriptionClients which are using the RegisterSessionHandler / RegisterSessionHandlerFactory methods to handle the session handling. I'm struggling to see how I can close all of this down gracefully. 

At the moment, I just have to call the Close method of my QueueClient / SubscriptionClient. This causes chaos within by session handlers - some may be in the middle of processing a message, but won't be able to 'Complete' it, causing exceptions to throw and the message to be left on the queue. This also all seems to happen after the Close method returns, which means the handlers may be running after I've asked them to stop. 

I had assumed 'Close' would first stop accepting sessions, let the current session handlers finally their current message, and then return... but that doesn't seem to be the case? Surely there is a better way to do this?


Please provide code for using webHttpRelayBinding ?

$
0
0

Hi,

I want to know how webHttpRelayBinding is used ?

Is it used to connect REST/HTTP client to Azure REST/HTTP Service via Azure Service Bus relay?

Does Azure Service Bus acts like an intermediary relay service in this case?

Please provide code for Azure REST Service, REST client & Service Bus configuration.

Thanks

Formulate messages to be sent over for Windows Service Bus

$
0
0

Hello,

Our (WCF) service would be receiving objects from source end which would be then creating respective topic and subscription on the Windows Service Bus.

Kindly let us know what would be the ideal approach for receiving and deciding on the data as based on it the messages would be rerouted to their respective subscriptions.

The sample messages that would be received are as following:-

[‎1/‎25/‎2016 5:09 PM] Tanveer N Saudagar:

The enterprise service manages which workflow is invoked ...

The enterprise service manages which workflow is invoked by reference to context attributes provided as part of the event messages.  The message context attributes include:

  •          Logical Message ID A globally unique system identifier used to logically define the message
  •          Application & Instance Name of the application & application instance
  •          Event & Event Type The name and type of event as defined in the Willis Event Reference
  •          Processing Authority The authority originating / invoking the underlying business event that gave rise to the application event
  •          Client Industry & Segment The industry and segment of the client
  •          Business unit, department or branch The responsible business unit, department, branch for the business transaction
  •          Product, Risk and Service The product and service classifications
  •          Data Principal The credentials used to determine the data access privileges
  •          Data Reference The underlying transaction reference

 

 


From the IoT Hub to the Database

$
0
0

I have an experimental IoT Hub running with an device placing events on the the event hub.

I've implemented a StoreEventProcessor class to consume the messages, filter the informations and place the data in various tables in a Azure SQL database.  Everything runs fine from my development machine.  What I don't understand yet is how to get the StoreEventProcessor class running automatically in Azure together with the Iot Hub?

I had a look at Azure Stream Analytics and will use it for alerts but what technology should I use for data sorting, filtering and storage?

Looking forward to any suggestions

Azure IoT SDK

$
0
0

Hello,

me and other friends are developing a new device that will transmit the data with M2M technology. We want to use the Azure IOT SDK for handle the communication. I have seen this page https://azure.microsoft.com/it-it/develop/iot/get-started/ where there is a sample code. We don't use any of that device listed so i want to know if it is possible port this code on other devices. I have understand that the send command is done by this: 

IoTHubClient_SendEventAsync(iotHubClientHandle, message,SendConfirmationCallback,&message);

but if i have a module GPRS i can add my driver for enable the transmission of the data to azure iot? or this sdk are only for the device indicated in that page?

I have an arduino uno with a gprs shield and normaly the data are send with a : 

AT+CIPSEND
http:/www.mysite.com/test/gettempdata.php?TI=25.5&TO=20.9&TR=16.7

using uart.


ypkdani

IoT Hub gives Rejected feedback after calling CompleteAsync()

$
0
0

I'm writing some example code to run on a Raspberry Pi (under Mono running on Raspbian) and communicate with an IoT Hub. I'm using DeviceExplorer to monitor the hub and send messages. I'm using HTTPS transport, as I had trouble with AMQPS.

This is my current receive messages code:


public async void ReceiveMessages()
{
    var pollRate = 180;

    for (;;)
    {
        Message m = await _deviceClient.ReceiveAsync();

        if( m==null)
        {
            _logger.LogDebug(string.Format(@"No message recieved so sleep for {0} seconds", pollRate));
            Thread.Sleep(pollRate*1000);
         }
         else
         {
             var contents = Encoding.UTF8.GetString(m.GetBytes());

             _logger.LogInfo(string.Format(@"Received message contents {0} {1} {2} {3} {4} {5} {6} {7}", contents, m.EnqueuedTimeUtc, m.ExpiryTimeUtc, m.LockToken, m.MessageId, m.SequenceNumber, m.To, m.UserId));

             /*await*/                _deviceClient.CompleteAsync(m);
             //_deviceClient.RejectAsync(m);
         }
    }
}

According to DeviceExplorer the messages are being marked as Rejected:

Started monitoring feedback for device rjwpi.
Sent to Device ID: [rjwpi], Message:"{"msg":"hello7"}", message Id: d15454ac-defa-49b1-af4f-623bc1b5f1bc
Message Feedback status: "Rejected", Description: "Message rejected", Original Message Id: d15454ac-defa-49b1-af4f-623bc1b5f1bc
Has anybody else seen this behaviour?



Service bus hogging up threads after IIS pool recycles

$
0
0

I have recently upgraded my service bus library to version v3.0.1 and noticed a strange behavior.

What I did was I performed load test against my web app (which will raise new event to the bus internally) and recycled the application pool in the middle of the test. Almost 100% of the time the service bus would stuck at somewhere for a very long period of time.

Because of overlapped recycle, IIS would spawn a new w3wp process to serve new requests and the existing w3wp process remains in the background until it finishes serving existing requests. The threads in existing w3wp process would stuck and strange thing is even the new w3wp process is also showing the same behavior.

Since every thread is stuck so IIS had to keep spawning threads to serve new requests. The thread count would increase until the point IIS no longer able to take it where it would start rejecting incoming requests.

I have upgraded to v3.0.9, but the problem persists. I have then downgraded to v2.6.5 and seems like the issue is not there.

Do we have any changes done in v3 that could potentially cause this issue? 

In case you want to replicate the issue, here are the steps:

  1. Create a web api project and use service bus v3.0.X. Our code raises event to a topic but potentially queue is also affected.
  2. Perform load test against the web api.
  3. After running for 1 - 2 minutes, recycle app pool and in task manager you would see the w3wp thread count start increasing.





Java EventhubsProducer ServerBusyException handling

$
0
0

Hi,

I'm using the next Java Producer for sending messages to an Azure Event Hub:

Google:   "Get Started with Event Hubs in Java | Microsoft Azure" (by Elio Damaggio).


I'm using an Eventhub with 10 partitions and 10 Throughput Units.

The producer sends 6 Million small messages (<1KB).

I sometimes see errors on the Eventhubs Dashboard counters:

  *ServerBusyErrors together with num of messages smaller than the num of messages that I sent

  *ServerBusyErrors but with num of messages equal to the num of messages that I sent

  *Other types of errors.

The problem is that the Java Producer does not catch (or does not expose out) any exceptions when those errors occur (or probably I fail to understand how exactly should I catch those exceptions in code).

Could it be that maybe the producer get the ServerBusyErros, handles them by itself (re-send policy of some sort) and does not expose all that out to me? Because that may partly explain how come there are errors but all messages were received.

(Or, could it be that Eventhub itself successfully receives a message although it issues a ServerBusyError?)

By the way, how accurate and reliable ar those dashboard counters?


AppDomain unloaded exception while running test with service bus version 2.6.5

$
0
0

We have multiple projects that are making use of the Azure service bus library. We are currently using v2.6.5 at the moment and we've been getting several warnings for unit tests that calls to the code in the library. This is the warning message:

System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion.

And we would get it everytime we invoke several methods. For example: TopicClient.CreateFromConnectionString(connectionString, topicName)

This warning will not appear if we use the built-in Visual Studio test runner (2012/2015) and it would appear if we opt to use the MSTest runner via the .runsettings file. 

It will also not appear if I update my service bus to version 3.0.0 and above but that is not possible because we were having a separate issues with them so the only option now is the stick to version 2.6.5 and try to fix those warnings.

Any idea what could be wrong? If you guys need additional information I'm happy to come up with a simple project that is able to reproduce the warning.



Service Bus Queue Dashboard Graphing Mismatch

$
0
0

Hello Teams!

Azure customer @WesReynolds15 brought to our attention a Service Bus monitoring graph that shows a mismatch. Can you review the graph and provide some insights on this possible issue? Thank you!

"Anyone else with service bus queue dashboard incorrect?  For me, the only number that looks right is Length.We don't think messages are getting dropped. The length is going up and down, so we know things are coming in and leaving.We are thinking the graph does not reflect reality (says 0 incoming, 0 outgoing... not true)"

Twitter conversation: https://twitter.com/WesReynolds15/status/692073068458455040


Change on 24th Jan?

$
0
0

I have two systems which use the azure service bus for messages (West Europe). They use the same instance, but different queues.

On the 24th at about 5:35am, the messages stopped processing. They are still in the queue, but are not being picked up by my services that subscribe to the queue.

Was there an update at around this time? My code hasn't updated for a few months.

I have added messages back in and they worked, but they stop working too after a while (I re-add them as a new message after completing). Before this, everything has worked well for some time.

Why Microsoft released the same dll/namespace name i.e. Microsoft.ServiceBus.DLL for Windows Service Bus and Azure Service Bus?

$
0
0
  • Microsoft.ServiceBus.dll -- Vesion 1.0 -- for Windows/Enterprize Service Bus
  • Microsoft.ServiceBus.dll -- Vesion 3.0 -- for Azure Service Bus

Why Microsoft released with the same name DLL/NameSpace name for two different things?

Due to this in my webapplicaiton I can't able to make a switch at runtime for windows/azure service bus decision.

Microsoft.ServiceBus.dll -- Vesion 1.0 -- for Windows/Enterprize Service Bus Microsoft.ServiceBus.dll -- Vesion 3.0 -- for Azure Service Bus

Why Microsoft release with the same DLL/NameSpace name for two different things?

Due to this in my webapplicaiton I Can't able to make a switch.

How to set expiry to SAS token

$
0
0

Hello,

Could anyone show me how to set an expiry parameter into SAS token for EventHub ?

Some articles say "expiry" should be included in token for security perspective, but I cannot find related servicebus or eventhub setting parameters in azure portal.. On the client device as event publisher, I use Apache Qpid Proton AMQP library.

Windows Service Bus Message Lost

$
0
0

Hello,

We are working on a scenario wherein if we are creating a topic and publishing a message.

However we are creating a subscription for that Topic later while we are fetching the message.
When we are attempting to do that we are unable to get the message.

We would like to understand that if a message is published to a topic and if no subscription is present for that topic then where does that message go, if we create a subscription later (say after 2 minutes) and try to fetch the same message; we could see that there is no corresponding message present for that topic neither in normal message queue nor in the dead letter queue.

Please help us in understanding what actaully happens.

Regards,

Tanveer


tanveersaudagar

Windows Service Bus Message Lost -Concluded

$
0
0

Hello,

We are working on a scenario wherein if we are creating a topic and publishing a message.

However we are creating a subscription for that Topic later while we are fetching the message.
When we are attempting to do that we are unable to get the message.

We would like to understand that if a message is published to a topic and if no subscription is present for that topic then where does that message go, if we create a subscription later (say after 2 minutes) and try to fetch the same message; we could see that there is no corresponding message present for that topic neither in normal message queue nor in the dead letter queue.

Please help us in understanding what actaully happens.

Regards,

Tanveer


tanveersaudagar

----------------------------------------------------------------------------------------------------------------------------------------

I have asked a simple and straight forward question; it would be of great help if I would receive answer only for that. I know hoe everything works and all and i don't need to go through that again.

All I need is a simple answer to my question; if there is any difficulty in understanding the query then please let me know; i would elaborate it even further.


tanveersaudagar


tanveersaudagar

Viewing all 1916 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>