Hello,
Does Events HUB works with Python?
I saw in documentation only example for .NET, Java and C.
Hello,
Does Events HUB works with Python?
I saw in documentation only example for .NET, Java and C.
I'm having trouble hosting my WCF service with NetTcpRelayBinding in IIS. When I activate the service by browsing the WSDL it publishes a relay to Azure service bus, but as soon as I try and call it the service host closes and the relay disappears. The only exceptions I can see service side are SocketException: remote server closed connection. If I host the same service in a Console host it works fine. Any ideas?
Good evening,
I created a new Azure Servicebus namespace earlier today (by now it's been 4..5 hours) but even now and after refreshing, logging in and out from the Management Portal, the creation of the namespace is still in state 'Activating'.
Usually this is done in a few seconds, minutes at most. According to the Azure status page there's nothing wrong/scheduled for the service bus service in my region (West EU) and as I cannot cancel/stop/delete that creation.. is there anything else I can do or does someone know what to do?
Thanks,
-Jörg B.
*Update: it has been >= 18 hours now.. & it is still in 'Activating' state.I created a new Azure Servicebus namespace earlier today using powershell and it shows Activating since 4 hours now.
i had created one earlier and it created instantly, but now any new one i create the service bus just says Activating. Tried refreshing, logging in and out.
Powershell is still displaying nothing.
I'm using newest Azure java sdk(version 0.6), but I found I have problems when I use service bus configuration "configureWithConnectionString" function. Here is my code below,
//get config
string connectionString ="Endpoint=sb://testservicebusnamespace.servicebus.windows.net/;SharedAccessKeyName=MySharedAccessKey;SharedAccessKey=<this is secret not show>";
config =newConfiguration();ServiceBusConfiguration.configureWithConnectionString(null, config, connectionString);//create service
service =ServiceBusService.create(config);And I get connection String from my service bus namespace portal in Azure. But When I run this code, it throws an exception "The key 'SharedAccessKeyName' is not valid for this connection string".
I don't know what's the problem, because I get the connection from Azure portal, and I've checked its content(the SharedAccessKeyName, SharedAccessKey), they are right.
So could anyone help me? Is it my problem or this SDK needs update(because I've heard portal already uses SAS, but SDK still uses ACS to authenticate)?
Thanks very much.
HI
Having some basic understanding now of SB for Window 1.1, I find myself faced with authentication questions.
There are two options I see. SAS Tokens or ACS Token.
Specifically, I have a SB installed on a hosted server somewhere in the cloud (not Azure Service Bus). This server is also hosting my web site. I want to allow the web site to write to a Queue. As I understand it, my client (the web site) will need to authenticate with the SB and satisfy a rule with the Write claim.
The web site can do this using a SAS token or ACS token can't it? With SAS, I create a SAS Rule on SB, give it a name and claim. This then generates two keys (primary and secondary). Do I simply use the friendly name of the rule and the primary key in the connection string in order to authenticate?
Additionally, I have a Windows Desktop application that also connects to my SB and subscribes to a Topic. Should I do the same here, use a friendly name SAS Rule and its primary key in the clients connection string to authenticate?
How would this differ using ACS?
Lots of questions I know. Sorry!
Thanks
Graham
This method would seem to be useful for reading multiple message from a queue but I've yet to get more than one.
var messages = await client.ReceiveBatchAsync(50); await client.CompleteBatchAsync(messages.Select(m => m.LockToken).ToArray());
Where client is a QueueClient. I've tried this using both ReceiveMode settings on the client (i.e. PeekLock and ReceiveAndDelete) and I consistently get only a single message back. I'd like to read all currently available messages from the queue in one pass and without something like a ReceiveBatchAsync then I'd have to await client.ReceiveAsync inside a loop until a null message was returned.
We make use of the Azure Service Bus Relay in our product (version 2.3.4 of theWindowsAzure.ServiceBus NuGet package). One of our customers reported that the CPU on their server was pegged at 100%. We had the customer run a performance analysis using DebugDiag which showed call stacks for the problematic threads:
[[HelperMethodFrame]
System_ni!System.Net.Security._SslStream.BeginRead(Byte[], Int32, Int32, System.AsyncCallback, System.Object)
Microsoft.ServiceBus.ServiceBusClientWebSocket
Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1[[System.__Canon, mscorlib]].EnumerateSteps(CurrentThreadType)
Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1[[System.__Canon, mscorlib]].StepCallback(System.IAsyncResult)
Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(System.IAsyncResult)
System_ni!System.Net.LazyAsyncResult.Complete(IntPtr)
System_ni!System.Net.Security._SslStream.StartFrameBody(Int32, Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
System_ni!System.Net.Security._SslStream.ReadHeaderCallback(System.Net.AsyncProtocolRequest)
System_ni!System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32)
System_ni!System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult)
System_ni!System.Net.LazyAsyncResult.Complete(IntPtr)
mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
System_ni!System.Net.ContextAwareResult.Complete(IntPtr)
System_ni!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
mscorlib_ni!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
[[GCFrame]
[[DebuggerU2MCatchHandlerFrame]
[[ContextTransitionFrame]
[[DebuggerU2MCatchHandlerFrame]
User Time 00:00:12.074 (+00:00:01.747)
Kernel time 00:00:05.943 (+00:00:00.749)
And:
System_ni!DomainNeutralILStubClass.IL_STUB_PInvoke(System.Net.SafeCloseSocket, System.Net.WSABuffer ByRef, Int32, Int32 ByRef, System.Net.Sockets.SocketFlags ByRef, System.Runtime.InteropServices.SafeHandle, IntPtr)
[[InlinedCallFrame] (System.Net.UnsafeNclNativeMethods
System_ni!System.Net.Sockets.Socket.DoBeginReceive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags, System.Net.Sockets.OverlappedAsyncResult)
System_ni!System.Net.Sockets.Socket.BeginReceive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags, System.Net.Sockets.SocketError ByRef, System.AsyncCallback, System.Object)
System_ni!System.Net.Sockets.NetworkStream.BeginRead(Byte[], Int32, Int32, System.AsyncCallback, System.Object)
System_ni!System.Net.FixedSizeReader.StartReading()
System_ni!System.Net.Security._SslStream.StartFrameHeader(Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
System_ni!System.Net.Security._SslStream.StartReading(Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
System_ni!System.Net.Security._SslStream.ProcessRead(Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
System_ni!System.Net.Security._SslStream.BeginRead(Byte[], Int32, Int32, System.AsyncCallback, System.Object)
Microsoft.ServiceBus.ServiceBusClientWebSocket
Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1[[System.__Canon, mscorlib]].EnumerateSteps(CurrentThreadType)
Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1[[System.__Canon, mscorlib]].StepCallback(System.IAsyncResult)
Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(System.IAsyncResult)
System_ni!System.Net.LazyAsyncResult.Complete(IntPtr)
System_ni!System.Net.Security._SslStream.StartFrameBody(Int32, Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
System_ni!System.Net.Security._SslStream.ReadHeaderCallback(System.Net.AsyncProtocolRequest)
System_ni!System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32)
System_ni!System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult)
System_ni!System.Net.LazyAsyncResult.Complete(IntPtr)
mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
System_ni!System.Net.ContextAwareResult.Complete(IntPtr)
System_ni!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
mscorlib_ni!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
[[GCFrame]
[[DebuggerU2MCatchHandlerFrame]
[[ContextTransitionFrame]
[[DebuggerU2MCatchHandlerFrame]
User Time 00:00:08.642 (+00:00:00.811)
Kernel time 00:00:04.212 (+00:00:00.406)
From the call stacks, it looks like Microsoft.ServiceBus.ServiceBusClientWebSocket is the culprit.
This issue appears to be very similar to the following issue: http://stackoverflow.com/questions/23198377/high-cpu-on-an-idle-servicehost-connected-to-azure-service-bus-relay
In the above Stack Overflow question, the person asking the question says the following:
It turns out that the high CPU is being triggered by an unexpected ACK\FIN packet. We suspect the firewall is what actually sends this, trying to close off the external connection. We were able to recreate the issue on other devices simply by injecting
the rogue ACK\FIN packet.
We are following up with Microsoft Azure team to try to get them to better handle the unexpected packet. We will also be following up with the network firewall team to try to isolate and eliminate the packet from being sent.
We haven't gotten as far as doing a packet analysis with our customer yet...
Questions:
I was wondering if using the WebStream instead of WebSocket would workaround the issue, but haven't been able to find a way to force the WebStream to be used.
I was hoping that setting ServiceBusEnvironment.SystemConnectivity.Mode to ConnectivityMode.AutoDetect and adding the following appSetting to Web.config would force it to use the WebStream:
<add key="Microsoft.ServiceBus.OverrideAutoDetectMode" value="Https" />
But it still always connects using TCP to port 5761. If I block port 5761, it always uses WebSockets.
Thanks!
My colleagues and I have identified an issue with Azure Service Bus where the service host consumes high CPU for about 90 seconds after a rogue ACK\FIN packet is received (we think the firewall may be sending this to close down the connection for some reason). We have an open ticket with the Microsoft Windows Azure Support team, but is there a specific place to put in a bug report to make sure it gets on the list for review (and hopefully addressed)? Below is a link to my original stackoverflow question.
http://stackoverflow.com/questions/23198377/high-cpu-on-an-idle-servicehost-connected-to-azure-service-bus-relay
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
Hi
I am using Service Bus for Windows 1.1. I want to create some new Shared Access Authorization Rules for my queues and topics but I'm not sure how to do this.
I am using the PowerShell and issuing the New-SBAuthorizationRule command, but this takes a parameter of -Namespacename. I can provide my Namespace here but that creates the rule on the Namespace, I want it on a Queue within the namespace.
Can anyone give me an example of the command line to use please?
Thanks for your help
Graham
Hey,
I've encountered an issue trying to retrieve messages from the service bus.
The scenario when i encounter this problem is when the app its running on a POS(Point of Sale) in another city. If i run the application on my pc it works perfectly even when i try to run it on a POS in the same office.
The exception i get is this:
System.UnauthorizedAccessException: 40105: Malformed authorization token.
The exception is thrown when i use
await SubscriptionClient.ReceiveAsync();
The subscription client is instantiated like this
var runtimeUri = ServiceBusEnvironment.CreateServiceUri("sb", _serviceBusConnectionData.ServiceBusNamespace, string.Empty);
var mf = MessagingFactory.Create(
runtimeUri,
TokenProvider.CreateSharedAccessSignatureTokenProvider("key", _serviceBusConnectionData.SecurityKey)
);
SubscriptionClient = mf.CreateSubscriptionClient(topicName, subscriptionName);I have no idea why this is happening and i cannot replicate it, it happens only on the POS and that being in another city.
Does anybody have any ideas?
Hi,
As I know, next Azure Java SDK maybe support SAS Authentication for Service Bus, not ACS any more. So I want to know the time when the next new release comes out. Because it's important for our team. Thanks very much.
I am receiving the following error when attempting to send telemetry to Event Hub using AMQP from an ASP.NET application.
Unauthorized access. 'Send' claim(s) are required to perform this operation. Resource: 'sb://changed-eh-ns.servicebus.windows.net/changed-eh'. TrackingId:7754266cd3f540099b6dda8ee0f66a10_G11,TimeStamp:12/7/2014 7:56:40 AM"
It seems pretty clear that I have some sort of authentication issue, but I've been unable to work out how to resolve it. I am trying to send from a ASP.NET web application.
namespace webns
{
public partial class eventhubamqp : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
int sendCount = Convert.ToInt32(SendCount.SelectedValue);
EventHubConnectSend(sendCount).Wait();
}
public async Task EventHubConnectSend(int sendCount)
{
var cs = @"Endpoint=sb://changed-eh-ns.servicebus.windows.net/;SharedAccessKeyName=EventHubListener;SharedAccessKey=0ZQ8Fp6nPfi1QFkXXXXXXb5NvBKEn1Am4B/n+zVq8LI=";
var builder = new ServiceBusConnectionStringBuilder(cs)
{
TransportType = TransportType.Amqp
};
var client = EventHubClient.CreateFromConnectionString(builder.ToString(), "changed-eh");
for (int i = 0; i < sendCount; i++)
{
try
{
var e = new Event
{
Message = "Test Message"
};
var serializedString = JsonConvert.SerializeObject(e);
var data = new EventData(Encoding.Unicode.GetBytes(serializedString))
{
PartitionKey = "0"
};
// Set user properties if needed
data.Properties.Add("Type", "Event");
await client.SendAsync(data).ConfigureAwait(false);
}
catch (Exception exp)
{
Console.WriteLine("Error on send: " + exp.Message);
}
}
return;
}
}
[DataContract]
public class Event
{
[DataMember]
public string Message { get; set; }
}
}
Glenn.
Hi,
Is it possible to create a Queue or a topic in Service Bus for Windows Server 1.1 using Powershell or do I have to do this through code?
Thanks
Graham
Thanks! VIJAY.
I am a bit confused with EventHub ConsumerGroups. I am currently sending event data to<NAMESPACE>.servicebus.windows.net/<EVENT_HUB_NAME>/publishers/<PUBLISHER_NAME>, which gives me a 201 so all is good.
1) Am I to assume this URI is always of this format for sending to the hub?
2) If 1) is true, then I don't see the benefit of creating a ConsumerGroup. If false, then I could create a ConsumerGroup on a URI such as NAMESPACE>.servicebus.windows.net/<EVENT_HUB_NAME>/publishers/<PUBLISHER_NAME>/livingroom.
I guess the short of it is I have no idea why I would create a ConsumerGroup and secondly what does it buy me?
thanks in advance
Trying out using Windows Azure Notification Hubs in a Windows Phone 8.1 application.
When I call RegisterNativeAsync passing the httpChannelUri, it throws a RegistrationAuthorizationException:
HTTP
request failed.
HTTP Details:
Status: 401
Reason: Unauthorized
Full content: <Error><Code>401</Code><Detail>ExpiredToken: . TrackingId:eddc6885-7154-411d-8e5e-a4381a78e3f2_G17,TimeStamp:12/11/2014 1:50:48 PM</Detail></Error>
Why is this? I can't find any documentation explaining the reason.
Microsoft Azure Service Bus with a subscription
So i have an application that subscribes to a topic and listens for messages. These messages have a seralizable payload. Every once in a while i'll notice the message count for the subscription says like 3 but my application that is listening on both the deadletter and subscription doesn't receive anything. No matter what i do those messages are just there. If i use the service bus explorer and copy message and resend i get a seralizable error.
My question is what causes a message to not deliver, and what can i do to retrieve it? The only way to get that subscription back to 0 is to delete it and recreate it.
Help??
I am trying to profile a worker role instance in my Azure deployment using Visual Studio IDE following the below link and it work well in locally with the Emulator.
http://msdn.microsoft.com/en-us/library/azure/hh369930.aspx#BK_ChoosingMethod
I have deployed a profiling version of the service using a release build, and with 'Instrumentation' as the profiling method.
I have tried setting the Visual Studio Symbol file locations to none, the location of the .pdb files in the solution and the location of another folder with the .pdb files copied into it.
When I use the profiling report option in Visual Studio Server Explorer, the .vsp file downloads, but I see lots of the following entries in the output window;
Warning VSP2701: D:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsAzureEventSource\v4.0_2.4.0.0__31bf3856ad364e35\WindowsAzureEventSource.dll could not be found when looking for symbol information.
Warning VSP2701: E:\approot\WorkerRole1.dll could not be found when looking for symbol information.
Warning VSP2701: D:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\x64\vsperfcorprof.dll could not be found when looking for symbol information.
Warning VSP2701: D:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\12.0.0\x64\Microsoft.IntelliTrace.Profiler.12.0.0.dll could not be found when looking for symbol information.
Warning VSP2701: E:\base\x64\mswasri.dll could not be found when looking for symbol information.
Warning VSP2701: E:\base\x64\WaRuntimeProxy.dll could not be found when looking for symbol information.
Warning VSP2701: D:\Windows\SYSTEM32\VSPerf120.dll could not be found when looking for symbol information.
Warning VSP2701: E:\approot\Microsoft.WindowsAzure.Diagnostics.dll could not be found when looking for symbol information.
Warning VSP2701: E:\approot\Microsoft.WindowsAzure.Diagnostics.StorageUtility.dll could not be found when looking for symbol information.
………………………
Then in the WorkerRole.vsp for the report, the function name ishexadecimal number, not the real name.
If we want to view the details for the specified Function, it will show:
Matching symbols could not be found. Choose the symbol settings… link to add the symbol file location and then reload the report.
I have already set the Symbols Settings:
And In D:\Azure_profiling Folder, it contains the all downloaded *.dll.
So how can I set the function name is the right one, and can view the details for each Function?
Thanks a lot!