Namespaces
Extremely slow queuing
This evening we were observing extremely slow queuing time. Our trace data told us that the line
await queueClient.SendAsync(message);
was taking 45-60 seconds. This was happening for two queues which had been around for a long time. They hardly ever have more then 1-2 records and we use a web job with a ServiceBusTrigger to pull off stuff. We are putting a simple POCO on the queue. There was another queue which was queueing quickly, so for lack of any other idea I deleted the two which were being troublesome. When the code recreated them (as it was built to do) they started queueing in less than a second. Nothing else changed, expect the deletion of the old queue and the recreation of the old queue. I used the service bus explorer before and after (I wish I had taken a screenshot) and nothing changed as far as I can tell.
Any idea why such a slowdown could occur or why recreating cleared it up? We doing such low volumn stuff as it's just a pilot system.
Thanks!
Dave
REST API - some issues sending/reading messages to/from topic
Hi,
I'm using Postman trying sending/reading messages to/from a Service Bus topic.
When sending a message I get a 201 response (obviously the message was sent successfully); however on the Azure Portal I don't see the message coming in.
This is the request for Sending a message
POST /in/xyz/messages HTTP/1.1
Host: xxx.servicebus.windows.net
Authorization: SharedAccessSignature sr=https%3a%2f%2fxxx.servicebus.windows.net%2fin%2fxyz&sig=<signature>skn=PublisherAccessKey
Content-Type: application/atom+xml;type=entry;charset=utf-8
Cache-Control: no-cache
Postman-Token: 0367c33a-bfdb-87cf-29ba-ef49d2d8eaa4
id=100I get a 201 but also ERROR: Could not parse the response.
This is the request for Reading messages
DELETE /in/xyz/messages/head HTTP/1.1
Host: xxx.servicebus.windows.net
Authorization: SharedAccessSignature sr=https%3a%2f%2fxxx.servicebus.windows.net%2fin%2fxyz&sig=<signature>se=65023492524&skn=SubscriberAccessKey
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Cache-Control: no-cache
Postman-Token: 3cba05df-9087-059f-0c15-f0924e0ea033The error message I get here:
<Error><Code>400</Code><Detail>The specified HTTP verb (DELETE) is not valid. TrackingId:e485acb6-fd6b-44a4-a1c3-bebea910b0fe_G43,TimeStamp:4/4/2015 5:58:17 PM</Detail></Error>
Anyone any idea what I'm doing wrong?
Thanks.
Guy
Problem about how to map windows.net to chinacloudapi.cn in Java
Hi,
According to this post to guide how to use Storm and eventhub 'hdinsight-storm-sensor-data-analysis' ( http://azure.microsoft.com/zh-cn/documentation/articles/hdinsight-storm-sensor-data-analysis/ )
when I need to run the command `mvn compile exec:java -Dstorm.topology=com.microsoft.examples.Temperature` to fetch event on Azure, I got the error,
"6650 [Thread-13-EventHub] ERROR backtype.storm.util - Async loop died!
java.lang.RuntimeException: com.microsoft.eventhubs.client.EventHubException: org.apache.qpid.amqp_1_0.client.ConnectionException: java.net.UnknownHostException:eventhub-yoyo-ns.servicebus.windows.net"
This problem may be that my account is China Azure, so I should change above the 'eventhub-yoyo-ns.servicebus.windows.net' to something like 'eventhub-yoyo-ns.servicebus.chinacloudapi.cn', however I couldn't find any method to do this, does anyone knows how to figure this?
Hope I explained my problem clearly, Many thanks.
Architecture Question - End-User scalability of queues
Hi,
I have a question around the design / usage of Queues.
We have a need for many client instances (sitting across business borders) to send data to a server instance and we're looking at Azure Service Bus / Message Queues to wire the clients-server together. One analogy of this architecture would be of an order system where many clients are sending their orders in, and the server responds with order status updates.
Using a single queue to send/receive the data for the server appears straight forward, however my scalability query resolves around how the server queues notification messages back to a specific client in a secure manner. Would we need to create a queue per client to guarantee messages for one client are not picked up by another, or is there another "single-queue" scalable mechanism we could rely on (similar to a conversation)?
Thanks,
Jay :)
If you shake a kettle, does it boil faster?
Receiving messages from Service Bus Topics in node js without polling
Hi, I have node js client who subscribed to a Topic, currently I'm using a timer to invoke receiveSubscriptionMessage every few seconds to get messages from the Topic.
Is there a way to do this without polling?
Thanks.
Service Bus Relay Forwarding Empty Data Contract to WCF Service
I have a WCF Service that works on premises hosted in a console app using NetTcpBinding. When I converted the project to use Azure Service Bus the WCF Service is presented with the proper object but all properties are null.
My on premises WCF client requires no explicit serialization but is there something I need to do to manually serialize it for the Service Bus (using a NetTcpRelayBinding)?
The two services are identical just the bindings are different. I have no errors surfacing in either project.
Thanks
J Donnelly
Differences in number of messages returned from Azure service bus queue
Our team had interesting experience regarding receiving messages from Azure service bus queue.
We had one Azure service bus queue in Australia region which contains thousands of unlocked messages. We ran simple console client at different machines sequentially. Three are laptops in the same office network in NZ and one is Windows VM. The point in the code related to interesting point is as follows. "_client" is just an instance of "QueueClient".
- First of all, even if "messageCount" parameter is specified as 100, Azure queue returns just around 34 messages even if there are thousands of unlocked messages in the queue.
- Secondly, for no particular reason, only one laptop can manage to request 100 messages at a time and get 34. For the rest (laptops and VM), even for the same simple console client with the same code base using "WindowsAzure.ServiceBus" nuget package (version 2.4.3.0), they can only manage to request 8 messages at a time and got 8 messages. We don't know whey "8" is magic number but only "8" as parameter for total messages works for two laptops and one VM. We tried out 100, 30, 10, 9 but, when console client requests Azure queue with total messages for 100, 30, 10, 9, Azure queue just returns 0 message.
// initialize QueueClient
var _client = QueueClient.CreateFromConnectionString(_connectionString, _path);
// receive a message batch
var messages = _client.ReceiveBatch(messageCount);
We saw that pattern is consistent for four machines we tested; i.e. only one laptop could manage to request a total of 100 messages even if it just got about 34 messages from Azure queue. What could be the reason?
Thanks,
Aung
Error "loading namespaces"
My subscription got suspended this morning as I ran out of credits. When I added some funds, it looks like the ServiceBus namespaces I had are all gone. Everything else seems to have come back. I got the following message "There was an error when we tried to load namespaces in subscription ID 'blah blah blah'.
Any ideas on how to address this? I hope i don't have to create the namespaces/queues/topics again, that would be a major problem. Thanks.
Firewall and Messaging With Service Bus and REST (HTML5 Mobile Application)
Hi,
I hope I can explain what I am trying to accomplish. Client data is on a local network, behind the firewall, on a ever which runs a MySQL database. Our mobile application which will be a web based html5+javascript mobile application like DevExtreme for example has to be able to access this data somehow. My idea was to use the Azure service bus.
MySQL Database <--- WCF Service --> || FIREWALL || ---> Azure Service Bus <--- Mobile App (using REST)
Am I looking at it correctly?
I cannot find any good samples how to do Azure Service Bus with relays and contacting the service bus using JavaScript calls with REST.
Any help would be appreciated.
Thanks.
High Availability for Service Bus 1.1 Queues through Load Balancer
Service Bus can be configured for HA by creating farm of minimum 3 node ring as per documentation. Therefore we will end up with multiple Service Bus Gateway addresses. It then becomes the responsibility of clients to switch between these addresses if one of the address fails.
My scenario involves using BizTalk 2013 sb-messaging adapter as client to SB queues. The out of box setting allows me to input just one address. I'm not sure if BizTalk handles this.
How can I address this limitation? Do I append all addresses of SB gateways in single connection string?
Or do I put SB far behind a load balancer? (but then we still are stuck with single point of failure of load balancer)
Or do I configure DNS round robin to specify fallback IP address and use just one of the SB gateway address?
Anyone else who encountered and handled this?
Notification Hub limit
Service bus using MQTT protocol
Hi ,
How can i use MQTT protocol in Azure Service Bus ?
Service Bus Namespcae programmatically
Consuming Service Bus Relay in Windows Store App
Hello,
I've setup a WCF endpoint on Azure Service Bus with basicHttpRelayBinding. I understand Windows store apps can consume this WCF endpoint.
I am having a hard time finding instructions on how to build the client in my Windows Store app. Can anyone point me in the right direction?
I have tried to use https://msdn.microsoft.com/en-us/library/hh556233(v=vs.110).aspx but I don't see that the Relay binding is available in the WinRt System.ServiceModel namespace.
Thanks,
J Donnelly
How to set RelayClientAuthenticationType to "None"
I have a WCF Service and I have programmatically built a Service Bus Relay Endpoint like so:
Uri[] uriArray = { address, networkAddress }; ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http; ServiceHost host = new ServiceHost(typeof(Retrieve),uriArray); ServiceMetadataBehavior mBehave = new ServiceMetadataBehavior(); host.Description.Behaviors.Add(mBehave); IEndpointBehavior serviceRegistrySettings = new ServiceRegistrySettings(DiscoveryType.Public); foreach (ServiceEndpoint endpoint in host.Description.Endpoints) { endpoint.Behaviors.Add(serviceRegistrySettings); endpoint.Behaviors.Add(sasCredential); }
I'm new at this so the App.config ended up including this system.serviceModel section:
<system.serviceModel><services><service name="WindowsService.Retrieve"><endpoint contract="WindowsService.IRetrieve" binding="basicHttpRelayBinding"/></service></services><extensions><bindingExtensions><add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></bindingExtensions></extensions></system.serviceModel>
I just need to set the RelayClientAuthenticationType toNone and it can be in the app.config or programmatically. I would like to learn both. Thanks!
John Donnelly
Problem sending notification message to Android and iOS devices with azure messaging dll
Delete Specific Message
I'm developing a system which will involve a lot of data synchronisation broken down into small tasks. I am adding each small task as a job/message on the Azure Service Bus queue.
I have X number of Worker Roles then checking the queues and processing the data.
I don't expect to have many messages in the queue because the aim is to process a message, complete it and then re-add the same message again, but scheduled for X minutes time. This will give me a loop to continue to process those tasks.
The great thing about the Azure functionality is that they handle all of the server side stuff for you, but the downside is that it can sometimes be difficult to debug or manipulate the data.
What I want to be able to do is present a list of messages in the queue (Which I have done using PeekBatch) in a web interface. I then want to be able to select some/all of the messages and delete them.
I might want to do this if there is a bug in the code and I want to stop messages of a certain type to stop.
Following on from that I'll have functionality to re-add messages from the web page too. Perhaps I might want to up my worker roles and messages to perform a task at a faster rate (or slow them down), or re-add messages I have deleted.
So, the question is, how can I actually select a specific message from the queue and then delete it? From what I can see, there is no obvious way to do this and, if it's possible, it will require some kind of workaround. This sounds a bit bizarre to me.
Problem configuring WCF Service bus endpoint
I'm trying to configure an existing WCF service, made with Visual Studio 2010 and Net Framework 4.0, to have a new Service Bus End Point.
I have done next steps (reference:
http://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-relay/
):
1. I have created a "Service Bus" in Azure
2. In my WCF Project I have added the "Service Bus" package using the Manage Nuget Packages. This modified the App.config of my WCF service.
3. I have modified the App.config like this:
<service name="WCFNom.WCFNom">
<!--existing endpoint -->
...
<!--new endpoint-->
<endpoint contract="WCFNom.IWCFNom"
binding="netTcpRelayBinding"
address="sb://wcfpib.servicebus.windows.net/WCFNom"
behaviorConfiguration="sbTokenProvider"/>
</endpoint>
...
<behaviors>
<endpointBehaviors>
<behavior name="sbTokenProvider">
<transportClientEndpointBehavior>
<tokenProvider>
<sharedAccessSignature keyName="RootManageSharedAccessKey" key="..." />
</tokenProvider>
</transportClientEndpointBehavior>
</behavior>
</endpointBehaviors>
</behaviors>
When I test the WCF the next error appears:
System.Configuration.ConfigurationErrorsException: The type 'Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35' registered for extension 'transportClientEndpointBehavior' could not be loaded.
Can you help me?
Thans,
Eva Janakieff
Peek Message before Receiving
Hi Azure experts,
I am new to the Azure and learning the could & service bus for past couple of weeks.
I am trying to read the messages from a Azure Service Bus Queue. The QueueClient receive method will pull the message out of the queue which I do not want to do initially. So I am browsing through all the messages in the queue one at a time in a while loop by using Peek() method. Then I compare the correlationId of the message with the Correlation Id i internally maintain in the local DB table.
Only if the correlation ID matches, then I go ahead and receive the message. But, Inorder to receive the message using the messageSequencenumber, I learned that I have to defer the message first, get the messageid stored in a list or something and then use the QueueClient Receive() method to receive the messages and finally mark the message as complete.
But Since I am browsing the messages using Peek(), this would not allow me to defer the message. I am stuck here in receiving the message using messageId.
Also I cannot just complete a message before receiving.
Can you please suggest any ways to accomplish this?
BrokeredMessage message = new BrokeredMessage(); message = null; while ((message = reader.Peek()) != null && row_count > 0) { List<long> deferredMessageReceipts = new List<long>(); // Read Ping results table to get the rows with no msg_recv_ts logobj.Categories.Clear(); logobj.Categories.Add("INFO"); logobj.Message = "Reading ! Message: " + " Correlation ID:" + message.CorrelationId; Logger.Write(logobj); if (message != null) { if (PRTA_rows.Corr_id == message.CorrelationId) //compare correlation ids { DateTime ping_recv_ts = DateTime.Now; logobj.Categories.Clear(); logobj.Categories.Add("INFO"); string messageBody = message.GetBody<string>(); logobj.Message = "Ack Message Found ! Message Body: " + messageBody + " Correlation ID:" + message.CorrelationId; Logger.Write(logobj); string msg_type = "PING_ACK"; logobj.Categories.Clear(); logobj.Categories.Add("INFO"); logobj.Message = "Marking Message as complete..."; Logger.Write(logobj); // Deferring a message message.Defer(); // Getting error here "The operation cannot be completed because the ReceiveContext is null." long msg_seq_nbr=message.SequenceNumber; reader.Receive(msg_seq_nbr); // This operation is not possible without deferring the message. message.Complete(); } } } // End while browsing messages.
- Neuronring