Created
October 1, 2014 18:35
-
-
Save ThomasArdal/613bafa602d6d26ea35b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading; | |
using Microsoft.ServiceBus.Messaging; | |
using Microsoft.WindowsAzure; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AzureMessageProducer | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var conn = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString"); | |
var client = TopicClient.CreateFromConnectionString(conn, "errors"); | |
while (true) | |
{ | |
Console.WriteLine("Click to deliver message"); | |
Console.ReadLine(); | |
client.Send(new BrokeredMessage("Hello World")); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment