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

How to use custom performance counters to monitor my app?

$
0
0

Hi,

I have a app which will read messages from a specified service bus queue. I want to monitor how many messages it read from service bus queue in the last minutes. And I want to use a custom performance counter to achieve that.

Then I first initialized the PerformanceCounterCategory by the following code:

            var counterCreationData = new CounterCreationData
            {
                CounterName = "numberOfMessages",
                CounterHelp = "help",
                CounterType = PerformanceCounterType.NumberOfItems32
            };

            var counterCollection = new CounterCreationDataCollection();
            counterCollection.Add(counterCreationData);

            PerformanceCounterCategory.Create(
                    "CustomCounterCategory","CategoryDescription",
                    PerformanceCounterCategoryType.SingleInstance,
                    counterCollection);

Then when my code receive messages, I just call the IncrementBy() method to count the messages. below is the code snippet:

private static readonly PerformanceCounter Counter = new PerformanceCounter("CustomCounterCategory", "numberOfMessages", string.Empty, false);

        private void OnReceive()
        {
            ...
		var messages = _subscriptionClient.ReceiveBatch(32);
		var brokeredMessages = messages as IList<BrokeredMessage> ?? messages.ToList();
		if (messages != null && brokeredMessages.Any())
		{
		      Counter.IncrementBy(messages.Count);
		      MessageReceived(this, brokeredMessages);
		}

         }

When I check the data from the azure table, "WADPerformanceCountersTable".  The CounterValue is just simply increasing. It is not the numbers of received messages in last minutes.

To get the numbers of received messages in last minutes, how should I write my code?

BTW, I'm using the AZure SDK 2.5. The transfer interval is set to 1 min, sample rate set to 20 sec. This might be changed.

Thanks.



Consuming Event Hub messages with the IEventProcessor interface

$
0
0

Hi - 

It seems that I am doing something wrong when I try to consume messages off of an Event Hub using the EventProcessorHost with an implemented IEventProcessor Interface.

If I manually create a receiver, I can pull messages of my hub. Example (just creating a receiver on partition "1"):

let consumer = ehClientrec.GetDefaultConsumerGroup().CreateReceiverAsync("1").Result
    let msg = consumer.ReceiveAsync()
    msg.Wait()
    Console.WriteLine(Encoding.UTF8.GetString(msg.Result.GetBytes()))

This successfully prints a message to my console. 

But if I try to use the event processor host, first I (very simply) implement the IEventProcessor interface:

type msgProc() =
    interface IEventProcessor with
        member this.CloseAsync(context,reason) =
            let r = reason.ToString()
            Console.WriteLine("Closed Partition {0} for reason: {1}",context.Lease.PartitionId,r)
            Unchecked.defaultof<Task>
        member this.OpenAsync(context) =
            Console.WriteLine("Opened Partition {0}",context.Lease.PartitionId)
            Unchecked.defaultof<Task>
        member this.ProcessEventsAsync(context,msgs) =
            Console.WriteLine("Received message.")
            Unchecked.defaultof<Task>

Then I create the host and register it, and run the program. 

I never hit the ProcessEventsAsync method.

Instead, I see console output that shows the Partitions cyclically opening and closing:

"Opened Partition 1""Opened Partition 2""Opened Partition 4""Opened Partition 3""Opened Partition 0""Opened Partition 5""Opened Partition 7""Opened Partition 6""Closed Partition 3 for reason: Shutdown""Closed Partition 6 for reason: Shutdown""Closed Partition 7 for reason: Shutdown""Closed Partition 2 for reason: Shutdown""Closed Partition 0 for reason: Shutdown""Closed Partition 1 for reason: Shutdown""Closed Partition 4 for reason: Shutdown""Closed Partition 5 for reason: Shutdown"

(This repeats forever, with the opening and closing partitions appearing in a slightly different order each time).

I can't find any documentation on what conditions typically cause a shutdown or what would cause this behavior. Any ideas?

I'm basically positive my EventProcessorHost is configured properly.

Thanks.

Long Polling with Topic/Subscription

$
0
0

Is it possible to implement long polling with topics? I can get it working with the service bus queues but I need to be able to filter the messages to certain iot clients.

Thanks

Long Polling with REST

$
0
0

I have set up long polling (comet programming) within Azure workers to test a messaging system I'm developing. It seems to work fine. However when I move the client outside Azure and use Node.js it's timing out after 230 seconds. I've found that Azure is closing the connection due to http inactivity. Is there anyway I can extend this timeout? Alternatively is there a different method by which I can connect Node.js to a Service Bus and wait for a message for several hours? Could such a connection be made without using Http for example? I have been researching this for several days to no avail and would appreciate definitive information so I can work out a periodic loop prioritised for peak time. An always connected long poll would be preferable.

Thanks.

Service Bus Send/Receive - REST API

$
0
0

I need to use the Azure Service Bus REST API for sending messages to Service Bus Topics. On the receiving side I'm using the Azure Service Bus SDK.

Message on the sender side:

POST https://your-namespace.servicebus.windows.net/HttpClientSampleQueue/messages?timeout=60 HTTP/1.1
Authorization: SharedAccessSignature sr=your-namespace&sig=Fg8yUyR4MOmXfHfj55f5hY4jGb8x2Yc%2b3%2fULKZYxKZk%3d&se=1404256819&skn=RootManageSharedAccessKey
BrokerProperties: {"Label":"M1","State":"Active"}
Content-Type: application/atom+xml;type=entry;charset=utf-8
Host: your-namespace.servicebus.windows.net

This is a message.

When reading the message body as message.GetBody<string> an error message is given  serialization exception.

I already searched the web and found a possible solution:

Stream stream = message.GetBody<Stream>();
StreamReader reader = new StreamReader(stream);
string str = reader.ReadToEnd();

or as an alternative (instead of converting to string) converting the stream into an XmlDocument

Are hese recommended ways to handle this issue?

Thanks.

EventProcessorHost not processing in Worker Role

$
0
0

I have a Worker Role that is hosting an EventProcessorHost to stream data from Event Hub.

This works fine whilst I'm sending events, but if I stop for a while, when I send events again it doesn't seem to pick up the events.

If I restart the Worker Role I get double the number of events.

Any thoughts?

What's wrong with my service bus queue

$
0
0

In my chat application, I have a service bus queue created 2 years ago, which works perfectly good and very fast.

Now, I needed to create a twin application, so I created a new namespace and queue. It doesn't work. It takes 10-20 seconds to receive the message, and it does it in a random order.

I switched back to the old queue and it works perfectly again.

I've been researching for a couple of days but I don't find the reason. It's not a network problem because it happens everytime the last 2 days. Everytime I switch to the new one, it doesn't work, and switching back to the old one, it works fine.

When I created the new queue, I see that there's no more issuer name and issuer key, there's a different authorization model. So what I'm doing is:

this.client = QueueClient.CreateFromConnectionString(RoleEnvironment.GetConfigurationSettingValue("ServiceBus"), "chatmessage");

The old way was a bit more verbose

Uri namespaceAddress = ServiceBusEnvironment.CreateServiceUri("sb", baseAddress, string.Empty);

            this.namespaceManager = new NamespaceManager(namespaceAddress, TokenProvider.CreateSharedSecretTokenProvider(issuerName, issuerKey));
            this.messagingFactory = MessagingFactory.Create(namespaceAddress, TokenProvider.CreateSharedSecretTokenProvider(issuerName, issuerKey));

It's strange that, although I don't find anymore the issuer name and key in Azure portal, I still connect with those credentials.

But besides the way I create the queue client, there's no difference in the way I send and receive the messages. I simply do a Send() and Receive().

The only thing I see different is that, in azure portal, the namespace type is "messaging" for the new namespace, and "mixed" for the old namespace. But the queues have all the same properties.

Could somebody point me in any direction?

thank you.


How to access Service bus 1.1 message queue from windows Service running in "local service"

$
0
0

I have set up a Service bus 1.1 for windows server and trying to access it using the following code.

 var sbUriList = new List<Uri>() { new UriBuilder { Scheme = "sb", Host = ServerFQDN, Path = ServiceNamespace }.Uri };
    var httpsUriList = new List<Uri>() { new UriBuilder { Scheme = "https", Host = ServerFQDN, Path = ServiceNamespace, Port = HttpPort }.Uri };

    NetworkCredential credential = new NetworkCredential("<User Name>", "<Password>", "<Domain>");

    ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback((s, cert, chain, ssl) => { return true; });

    TokenProvider tokenProvider = TokenProvider.CreateOAuthTokenProvider(httpsUriList, credential);
    messageFactory = MessagingFactory.Create(sbUriList, tokenProvider);



    ServiceBusConnectionStringBuilder connBuilder = new ServiceBusConnectionStringBuilder();
    connBuilder.ManagementPort = HttpPort;
    connBuilder.RuntimePort = TcpPort;
    connBuilder.Endpoints.Add(new UriBuilder() { Scheme = "sb", Host = ServerFQDN, Path = ServiceNamespace }.Uri);
    connBuilder.StsEndpoints.Add(new UriBuilder() { Scheme = "https", Host = ServerFQDN, Port = HttpPort, Path = ServiceNamespace }.Uri);

    namespaceManager = NamespaceManager.CreateFromConnectionString(connBuilder.ToString());

if (!namespaceManager.QueueExists(queuename))
{
    namespaceManager.CreateQueue(queuename);
}
this works fine if i run my code from a console application, but however if I put this in a windows service and run it under either a Local service or Local System the code throws the following exception while trying to check if the queue exists in the following line 
namespaceManager.CreateQueue(queuename);
Unexpected exception : System.UnauthorizedAccessException: The remote server returned an error: (401) Unauthorized. Manage claim is required for this operation..TrackingId:5be1365e-b4ae-4555-b81b-dcbef96be9d0_GIE11LT32PD622,TimeStamp:4/19/2015 3:51:28 PM ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult`1.<GetAsyncSteps>b__2d(GetAsyncResult`1 thisPtr, IAsyncResult r)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
   --- End of inner exception stack trace ---
Can someone help me understand how I can run my code as a windows service in either a "Local Service" or "Local System" and still be able to access the queue and post my messages.


Daily/hourly MessagingCommunicationException and MessagingExceptions

$
0
0
I'm using the Azure Service Bus and everything works fine. But when I'm checking the logs for the consumer of the messages of the bus I can find a lot ofMessagingExceptions or MessagingCommunicationException. Anyone know how to solve those errors?

MessagingCommunicationException:

    Microsoft.ServiceBus.Messaging.MessagingCommunicationException: Error during communication with Service Bus. Check the connection information, then retry. ---> System.ServiceModel.CommunicationObjectFaultedException: Internal Server Error: The server did not provide a meaningful reply; this might be caused by a premature session shutdown. TrackingId: TRACKING_ID, Timestamp:4/20/2015 8:10:58 AM

    Server stack trace: 

    Exception rethrown at [0]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

    Exception rethrown at [1]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass17.<GetAsyncSteps>b__a(RequestAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

    Exception rethrown at [2]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.EndRequest(IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

    Exception rethrown at [3]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.EndReceiveCommand(IAsyncResult result, IEnumerable`1& messages)
    --- End of inner exception stack trace ---
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.MessageReceiver.RetryReceiveAsyncResult.TryReceiveEnd(IAsyncResult r, IEnumerable`1& messages)
    at Microsoft.ServiceBus.Messaging.MessageReceiver.EndTryReceive(IAsyncResult result, IEnumerable`1& messages)
    at Microsoft.ServiceBus.Messaging.MessageReceivePump.PumpAsyncResult.<GetAsyncSteps>b__1b(PumpAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)


MessagingExceptions:

    Microsoft.ServiceBus.Messaging.MessagingException: The server was unable to process the request; please retry the operation. If the problem persists, please contact your Service Bus administrator and provide the tracking id. TrackingId:TRACKING_ID, Timestamp:4/20/2015 6:42:00 AM ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The server was unable to process the request; please retry the operation. If the problem persists, please contact your Service Bus administrator and provide the tracking id. TrackingId:TRACKING_ID, Timestamp:4/20/2015 6:42:00 AM

    Server stack trace: 
    at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.ThrowIfFaultMessage(Message wcfMessage)
    at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.HandleMessageReceived(IAsyncResult result)

    Exception rethrown at [0]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

    Exception rethrown at [1]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass17.<GetAsyncSteps>b__a(RequestAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

    Exception rethrown at [2]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.EndRequest(IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

    Exception rethrown at [3]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.EndReceiveCommand(IAsyncResult result, IEnumerable`1& messages)
    --- End of inner exception stack trace ---

    Server stack trace: 
    at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.EndReceiveCommand(IAsyncResult result, IEnumerable`1& messages)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

    Exception rethrown at [0]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.OnEndTryReceive(IAsyncResult result, IEnumerable`1& messages)
    at Microsoft.ServiceBus.Messaging.MessageReceiver.RetryReceiveAsyncResult.<GetAsyncSteps>b__72(RetryReceiveAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

    Exception rethrown at [1]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.ServiceBus.Messaging.MessageReceiver.RetryReceiveAsyncResult.TryReceiveEnd(IAsyncResult r, IEnumerable`1& messages)
    at Microsoft.ServiceBus.Messaging.MessageReceiver.EndTryReceive(IAsyncResult result, IEnumerable`1& messages)
    at Microsoft.ServiceBus.Messaging.MessageReceivePump.PumpAsyncResult.<GetAsyncSteps>b__1b(PumpAsyncResult thisPtr, IAsyncResult r)
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

One listener to multiple topic-subscriptions

$
0
0

I have several Topics (multiple customer) with the same Subscriptions (e.g. AlertService, CRM,...). For every subscription I have an application-service (AlertService, CRM,...) that should handle/process the respective messages appropriately.

So my idea was to have one listener (for every application service) per type of subscription.
Additionally adding a topic with subscriptions (=for provisioning a new customer) should add the subscription to the listeners without restarting.

Is this something feasible and advisable? Or what are more appropriate ways to handle these kind of problems?

Thanks.

Service bus queueclient receive returns null, if the message size is more than 64kb

$
0
0

Hi,

I was able send message to service bus queue with message size more than 64kb. but i can't receive it, it returns null. Do you have any idea what i am missing?

Thanks

Ksen


Event Hub failover implementation

$
0
0

EventProcessorHost provides a persistent checkpoint storage in blob for failover. But this is only a convenience for failover not failover itself.

Event Hub does not have similar concept as Message Queue paired namespaces for queue redundancy (failover). How would one implement Event Hub redundancy easily?

 

Using PartitionedSender to send an event to an EventHub got exception.

$
0
0

var manager = NamespaceManager.CreateFromConnectionString(xxx);
var eventHubSender = eventHubClient.CreatePartitionedSender(description.PartitionIds[0]);

eventHubSender.Send(new EventData("Hello") {PartitionKey=eventHubSender.PartitionId);

result in

$exception{"The specified partition key '0' is invalid for partition '0'. Do not set a value for partition key or send using EventHubClient.Send."}System.Exception {System.ArgumentException}

What is wrong?

Lease.PartitionId vs EventData,PartitionId in Azure Event Hub implementation using EventProcessorHost as receiver.

$
0
0

I simply have an app with a sender using EventHubClient and receiver using EventProcessorHost agianst the same EventHub created in Azure Cloud. The event hub has 16 partitions. The sending (using EventHubClient) EventData all have a fixed partitionKey. A implementation class implementing IEventProcessor is registered with the EventProcessorHost object. However, when run, the  receiver PartitionContext.Lease.PartitionId does not agree with the EventData.PartitionKey within the fetched messages in IEventProcessor::ProcessEventAsync(). What is the difference of Lease.PartitionId and EventData.PartitionKey?

Since Event Hub does not have session concept (like session in message queue), if I have multiple instances of SENDER class and expect each one receive only the event it sends, using partitionKey, how would I implement?

Brokered Message - Queue Read Problem

$
0
0

Hello Azure Experts !

I am in a need to browse through the messages in the service bus queue using peek().
Say, there are 500 servicepathURL I am sending a message request 500 messages in total. I store these 500 request messages and correlation ids in a DB Table. Each servicepathURL respond back to a different destination URL(Ack ServicepathURL). So there will be 500 ack messages. Now, I need check the Ack ServicepathURL for each of the 500 messages i sent.

Pseudocode

foreach (corrid in DB table) //total 500 corrIds
{

 BrokeredMessage message = new BrokeredMessage();
 message = null;

// Start searching the corrid 1
// Next iteration of for loop. Continue Looking corrid 2

    while ((message = reader.Peek()) != null && row_count > 0) // total 500 msgs in the queue
     {
// Here I just peek, not receive. So the message will still stay in the queue
          if (DB.corrId == message.corrId
         {
          write_log("Found My Message")
          }

     } //End While

} // End Foreach... For loop continues 

From the above pseudo code, it is shown that, I take a corrId from my local DB table, compare it with 500 messages in the queue, If a match is found, I mark it as MESSAGE FOUND in the table. But not marking the message as complete. So the message will be left in the queue.

Then, take the next corrid from the DB table again, compare it with all the 500 messages in the queue. This keeps going for all the 500 records in the table.

So the total number of reads will be 500 * 500 = 250,000. This takes lot of time and keeps the queue read busy which could potentially cause some issues..?? 

Is while loop the only way to browse the messages ? Can I all the 500 messages in the queue at one shot, store it in a dictionary or something and then compare against the table..? 

    


- Neuronring


Azure Service Bus Relay Periodical Disconnection

$
0
0

I'm implementing a service host with the Azure Service Bus Relay. The implementation is very straight forward:

Program.cs:

public class Program
{
    public static void Main(string[] args)
    {
        var random = new Random(Environment.TickCount);

        ServiceHost sh = new ServiceHost(typeof(ProblemSolver));

        var endpoint = sh.Description.Endpoints[0];
        var serviceRegistrySettings = new ServiceRegistrySettings(DiscoveryType.Public);
        endpoint.Behaviors.Add(serviceRegistrySettings);
        string randomText = random.Next().ToString();
        var listenUri = new Uri(endpoint.Address.Uri, randomText  + "/");
        endpoint.ListenUri = listenUri;

        sh.Open();
        Console.WriteLine("Hosted: " + randomText);
        Console.ReadLine();
        sh.Close();
    }
}

app.config:

<bindings><netTcpRelayBinding><binding name="default"><security mode="None" relayClientAuthenticationType="RelayAccessToken" /></binding></netTcpRelayBinding></bindings><services><service name="RelayPrototype.ProblemSolver"><endpoint contract="RelayServiceContract.IProblemSolver"
              binding="netTcpRelayBinding"
              bindingConfiguration="default"
              address="sb://test.servicebus.windows.net/problemSolver/"
              listenUri ="sb://test.servicebus.windows.net/problemSolver/"
              behaviorConfiguration="sbTokenProvider"/></service></services><behaviors><endpointBehaviors><behavior name="sbTokenProvider"><transportClientEndpointBehavior><tokenProvider><sharedAccessSignature keyName="RootManageSharedAccessKey" key="[mykey]" /></tokenProvider></transportClientEndpointBehavior></behavior></endpointBehaviors></behaviors>

The problem I'm facing is that once this is hosted, it is periodically disconnected after an interval of 2 minutes.

At this point, the TCP state of the service host changed from ESTABLISHEDto CLOSE_WAIT.

Monitoring the TCP traffics, I found that the source ns-sb2-prod-sg3-001.cloudapp.net sent a packet that contains FIN flag, which i suspect might have caused the disconnection.

The service host will try again to establish the connection to Azure after some time. Once the connection is established again, the disconnection cycle continues.

However, this scenario only happen on my local machine. The service is hosted fine on machines in other environment setup.

Could this be my implementation of the service host or is it something to do with the local network?




Capturing service bus traffic with fiddler

$
0
0

Hi,

I'm using Node js to connect to Service Bus Topics and I'm having problems to get the Topic information programmatically. I'm trying to use fiddler to debug the problem. In order to see the node js traffic I'm setting the proxies in the command line shell to : https_proxy=http://127.0.0.1:8888
http_proxy=http://127.0.0.1:8888
NODE_TLS_REJECT_UNAUTHORIZED=0

but in fiddler I can only see the tunneling to https.

My question is how do I change the traffic to the Service Bus to HTTP so I can monitor it with fiddler.

Also, if you think about other ways i can debug calls to Service Bus it will be helpful.

Thanks.

Azure Service - Service Bus as a Cloud Gateway [Project Reykjavik]

$
0
0

Hi,

I saw several Microsoft presentations where Service Bus as Cloud Gatewey Project Reykjavik is mentioned.

I'm a little but confused about the following:

Service Bus as a Cloud Gateway

- Each device gets a dedicated Inbox/Outbox “queue” on the Gateway
- Outbox: Telemetry, alerts and service invocations
- Inbox: commands and queries
...
Now when looking at the setup of Azure Service Topics & Subscription I see:

Ingestion topics (or ingress) named as in0000, in0001, etc. [The ingestion topics are for incoming telemetry data]
Command topics (or egress) named as out0000, out0002, etc. [The command topics for sending commands to devices]

So to my understanding the latter naming is the opposite of what is described earlier. How should I interpret this?

By the way is project Reykjavik something that never become available publicly (with other words remains something for Microsoft targeted organisations)?

Thanks.
Guy

*

Azure Service Bus - Big latency problems with topics since (at least) yesterday

$
0
0

Hi Azure Support Team,

since yesterday we are often not able to connect to our Azure Service Bus Namespace (hosted in West Europe) from our application neither via Service Bus Explorer. We are connecting from from our developer machines. Sometimes it works, sometimes it takes 30 seconds and sometimes we get timeouts. Its really frustrating and unreliable.

What can we do? Is there something you can investigate?

Best regards from Germany,

Tobias Jamin

Service Bus Relay Authentication using JavaScript

$
0
0

Hi,

We have a WCF service exposing some functions with, it connects to the azure service bus relay using a shared key. Our client application is written in HTML5+JS running on a phone or tablet. How can we authenticate with the service bus using SAS with the client app thru JavaScript? Can't find any examples.

Viewing all 1916 articles
Browse latest View live


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