John H
John H

Reputation: 242

SignalR and Azure - unreliable messaging?

I have SignalR running on an Azure cloud service, and I have tried to use the azure message bus to communicate across instances.

I used the following code to connect to the message bus:

GlobalHost.DependencyResolver.UseWindowsAzureServiceBus(
                "Endpoint=sb://<snip>;SharedSecretIssuer=<snip>;SharedSecretValue=<snip>",
                1, /* number of Instances */
                5 /* number of Topics*/
                );

However, when this line is in place, only about 50% of messages ever actually get returned.

If I comment this line out, 100% of messages are processed, but I am limited to running one instance.

Is there anything special I need to do with my azure service bus?

Also, what difference does the number of instances / topics actually make?

Upvotes: 0

Views: 760

Answers (1)

Yves Goeleven
Yves Goeleven

Reputation: 2185

John,

I think the number of instances translates into the number of subscriptions on each topic, so this number should imo equal to the number of instances you host (RoleEnvironment.CurrentRoleInstance.Role.Instances.Count).

I guess that you're missing messages because this value has been set to 1 instead of 2 (which I guess is your instance count)

The number of topics will result into more topics that are used to channel the messages between instances and increase throughput if you should hit any of the servicebus quota's.

Kind regards, Yves

Upvotes: 2

Related Questions