What should you do?

You are writing an application that will run on a portable computer.
The application uses a private queue named MyAppQueue to store messages.
You need to ensure that the message is retained when the portable computer is restarted.

What should you do?

You are writing an application that will run on a portable computer.
The application uses a private queue named MyAppQueue to store messages.
You need to ensure that the message is retained when the portable computer is restarted.

What should you do?

A.
Write the following code segment to send the message.
MessageQueue q = new MessageQueue(“MyAppQueue”);
Message m = new Message(“My message body”)
;m.UseJournalQueue = true;q.Send(m, “message”);

B.
Write the following code segment to send the message.
MessageQueue q = new MessageQueue(“MyAppQueue”);
Message m = new Message(“My message body”);
m.Recoverable = true;
q.Send(m, “message”);

C.
Write the following code segment to send the message.
MessageQueue q = new MessageQueue(“MyAppQueue”);
Message m = new Message(“My message body”);
MessageQueueTransaction trans = new MessageQueueTransaction();
trans.Begin();
q.Send(m, “message”, trans);
trans.Commit();

D.
Write the following code segment to send the message.
MessageQueue q = new MessageQueue(“MyAppQueue”);
Message m = new Message(“My message body”);
m.Priority = MessagePriority.High;
q.Send(m, “message”);



Leave a Reply 0

Your email address will not be published. Required fields are marked *