Which two actions should you perform?

A Windows-based application sends messages to the TestMessageQueue queue.

An acknowledgement message must be sent to the TestMessageQueueAdmin queue when:
The original message is retrieved from TestMessageQueue.
The message has not been retrieved from TestMessageQueue after a specified time period.

The following code is used to send a message to the TestMessageQueue queue.

(Line numbers are included for reference only.)
01 MessageQueue mq = new MessageQueue(“.\\TestMessageQueue”);
02 MessageQueue mqAdmin = new MessageQueue(“.\\TestMessageQueueAdmin”);
03 Message m = new Message(messageBody);
04 m.AcknowledgeType = AcknowledgeTypes.PositiveReceive;
05 mq.Send(m);

You need to ensure that an acknowledgement message is sent to the TestMessageQueueAdmin queue as required.

Which two actions should you perform?(Each correct answer presents part of the solution. Choose two.)

A Windows-based application sends messages to the TestMessageQueue queue.

An acknowledgement message must be sent to the TestMessageQueueAdmin queue when:
The original message is retrieved from TestMessageQueue.
The message has not been retrieved from TestMessageQueue after a specified time period.

The following code is used to send a message to the TestMessageQueue queue.

(Line numbers are included for reference only.)
01 MessageQueue mq = new MessageQueue(“.\\TestMessageQueue”);
02 MessageQueue mqAdmin = new MessageQueue(“.\\TestMessageQueueAdmin”);
03 Message m = new Message(messageBody);
04 m.AcknowledgeType = AcknowledgeTypes.PositiveReceive;
05 mq.Send(m);

You need to ensure that an acknowledgement message is sent to the TestMessageQueueAdmin queue as required.

Which two actions should you perform?(Each correct answer presents part of the solution. Choose two.)

A.
Add the following line of code between lines 04 and 05.
m.AdministrationQueue = mqAdmin;

B.
Add the following line of code between lines 04 and 05.
m.ResponseQueue = mqAdmin;

C.
Replace line 04 with the following code.
m.AcknowledgeType = AcknowledgeTypes.PositiveReceive & AcknowledgeTypes.NegativeReceive;

D.
Replace line 04 with the following code.
m.AcknowledgeType = AcknowledgeTypes.PositiveReceive | AcknowledgeTypes.NegativeReceive;



Leave a Reply 0

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