SQL SERVER SERVICE BROKER-QUEUE Retention

Source: Internet
Author: User

It is also important to specify a retention when creating a queue ..

1. If retention = on. Then, even if the message is receive, it will remain in the queue until the conversation is ended

Alter queue [DBO]. [targetqueue] with status = on, retention = on, poison_message_handling (status = on)

2. If retention = off, after the message is receive, the message is removed from the queue.

Here, the status in the queue is also interesting. Once it is received, it is changed from 1 to 0,

The Microsoft SQL Server document says:

Status of the message. The receive statement returns all messages that have a status
1. If message retention is on, the status is then set to 0. If message retention is off, the message is deleted from
Queue. messages in
Queue can contain one of the following values:

0= Retained received message

1= Ready to receive

2= Not yet complete

3= Retained sent message

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.