Skip to content

Instantly share code, notes, and snippets.

@ThomasArdal
Created October 1, 2014 18:35
Show Gist options
  • Save ThomasArdal/613bafa602d6d26ea35b to your computer and use it in GitHub Desktop.
Save ThomasArdal/613bafa602d6d26ea35b to your computer and use it in GitHub Desktop.
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