How to Send a Message to Microsoft Azure Queue Service with Java


public final class AzureSample {

  public static void main(final String[] args) throws Exception {
    final CloudStorageAccount account = CloudStorageAccount.parse("DefaultEndpointsProtocol=https;AccountName=accountname;AccountKey=accountKey");

    final CloudQueueClient client = account.createCloudQueueClient();

    final CloudQueue queue = client.getQueueReference("sample-queue");

    queue.addMessage(new CloudQueueMessage("Simples Assim"));


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s