milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home

Service bus and topic creation

Details
Written by: Stanko Milosev
Category: Windows
Published: 30 April 2013
Last Updated: 06 April 2022
Hits: 5793

First we will go to service bus:

 

 

And we will create one service bus:

 

After we created service bus, we can create either queue or topic. Topic is like a "view of queues" - can be understood like view in MS SQL Server. Topic and queues can be created manually or programmatically.

One example of creating topics, is something like:

TokenProvider tokenProvider = TokenProvider.CreateSharedSecretTokenProvider (TopicUtilities.GetIssuerName (), TopicUtilities.GetIssuerKey ());
Uri serviceUri = ServiceBusEnvironment.CreateServiceUri ("sb", TopicUtilities.GetServiceNamespace (), string.Empty);
NamespaceManager namespaceManager = new NamespaceManager (serviceUri, tokenProvider);

Where GetIssuerName, GetIssuerKey, and GetServiceNamespace are like:

 

public static String GetIssuerName()
{
	if (_IssuerName == null)
	{
		lock (SYNC_LOCK)
		{
			if (_IssuerName == null)
			{
				_IssuerName = ReadAttribute("myNameSpace.something.Client.IssuerName", DefaulIssuerName);
			}
		}
	}
	return _IssuerName;
}

public static String GetIssuerKey()
{
	if (_IssuerKey == null)
	{
		lock (SYNC_LOCK)
		{
			if (_IssuerKey == null)
			{
				_IssuerKey = ReadAttribute("myNameSpace.something.Client.IssuerKey");
} } } return _IssuerKey; } public static String GetServiceNamespace() { if (_ServiceNamespace == null) { lock (SYNC_LOCK) { if (_ServiceNamespace == null) { _ServiceNamespace = ReadAttribute("myNameSpace.something.Client.ServiceNamespace");
} } } return _ServiceNamespace; }

Then in, for example, ServiceConfiguration.Local.myApp.cscfg you must have something like:

 
<ConfigurationSettings>
	<Setting name="myNameSpace.something.Client.IssuerName" value="owner" />
	<Setting name="myNameSpace.something.Client.IssuerKey" value="myKey" />
	<Setting name="myNameSpace.something.Client.ServiceNamespace" value="stanko2" />
</ConfigurationSettings>

Where myKey you can get if you click on service bus, and then on the access key, like on the picture

ServiceConfiguration.Local.myApp.cscfg is configuration if you want to deploy your app to Azure, but first to test it locally, so this configuration is for local Azure deployment.

For command line test, you can just something like:

 

NamespaceManager namespaceManager = NamespaceManager.Create();

but in your app.config you must to have something like:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <!-- Service Bus specific app setings for messaging connections -->
    <add key="Microsoft.ServiceBus.ConnectionString" value="Endpoint=sb://stanko.servicebus.windows.net/;SharedSecretIssuer=owner;SharedSecretValue=Bqcy7BC020Top5t1jcQnJ7CZN23t2JmqhpXwIRDGjEU=" />
  </appSettings>
</configuration>

None of these examples were not tested.

Check locks

Details
Written by: Stanko Milosev
Category: SQL
Published: 25 February 2013
Last Updated: 30 November -0001
Hits: 5620

How to check locks in Azure SQL?

 

 
SELECT * FROM sys.dm_db_wait_stats
ORDER BY wait_time_ms desc

WadLogsTable

Details
Written by: Stanko Milosev
Category: SQL
Published: 26 December 2012
Last Updated: 30 November -0001
Hits: 5595

Table where we can see logs from Windows Azure.

Copy database

Details
Written by: Stanko Milosev
Category: SQL
Published: 16 December 2012
Last Updated: 16 December 2012
Hits: 5667

Use "CREATE DATABASE destination_database_name AS COPY OF [source_server_name.] source_database_name" to make a copy of database on the Azure SQL.

There is also possibility to check progress of DB copy, but at this moment I don't have that code. 

  1. Import BACPAC files (restore backup from windows Azure)
  2. How to get row count of every table in a SQL Azure Database
  3. Add firewall rule
  4. Debug ASP.NET on IIS

Subcategories

C#

Azure

ASP.NET

JavaScript

Software Development Philosophy

MS SQL

IBM WebSphere MQ

MySQL

Joomla

Delphi

PHP

Windows

Life

Lazarus

Downloads

Android

CSS

Chrome

HTML

Linux

Eclipse

Page 40 of 164

  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44