How to guarantee the azure FIFO line

I understand that the MS Azure Queue service document http://msdn.microsoft.com/en-us/library/windowsazure/dd179363.aspx says that the behavior of the first exit (FIFO) is not guaranteed.

However, our application is such that ALL messages must be read and processed in FIFO order. Can anyone suggest how to achieve guaranteed FIFO using Azure Queue Service?

Thank.

+6
source share
6 answers

The latest version of Service Bus offers a reliable message queue: Queues, Topics, and Subscriptions

+4
source

:

1) = false. 2) , , : -

var message = new BrokeredMessage(item);
message.SessionId = "LB";
Console.WriteLine("Response from Central Scoring System : " + item);
client.Send(message);

3) : -

queueClient.OnMessage(s =>
{
    var body = s.GetBody<string>();
    var messageId = s.MessageId;
    Console.WriteLine("Message Body:" + body);
    Console.WriteLine("Message Id:" + messageId);
});

4) , .

!!

+1

docs Azure Storage, :

, ; , - (, ). , , . ( ) .

, ? .

+1

, , FIFO, Azure .

program.cs .

    static void Main()
            {
                var config = new JobHostConfiguration();

                if (config.IsDevelopment)
                {
                    config.UseDevelopmentSettings();
                }
                config.Queues.BatchSize = 1; //Number of messages to dequeue at the same time.
                config.Queues.MaxPollingInterval = TimeSpan.FromMilliseconds(100); //Pooling request to the queue.


                JobHost host = new JobHost(config);

....your initial information...

            // The following code ensures that the WebJob will be running continuously
            host.RunAndBlock();

100 .

This works great with a weblog blogger to write trace information to files.

0
source

All Articles