Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated guidance around time-to-be-received (TTBR) and auditing #6717

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ramonsmits
Copy link
Member

No description provided.

@ramonsmits ramonsmits self-assigned this Jun 24, 2024
Copy link
Member

@SzymonPobiega SzymonPobiega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if it would not be better to invert the documentation and just state "TTBR is processed at the receiver" and (maybe) add small note for RabbitMQ that in addition to that, the broker is able to remove expired messages but it looks only at the head of the queue.

| Scripted Deployment | SQL Scripts |
| Installers | Optional |
| Native integration | Supported, see [SQL statements used by the transport](https://github.com/Particular/NServiceBus.SqlServer/blob/master/src/NServiceBus.Transport.PostgreSql/PostgreSqlConstants.cs) |
| [time-to-be-received](#time-to-be-received) (TTBR) | Storage reclaimed at most 5 minutes after expiration when receiving endpoint is running |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 5 minutes? The PostgreSQL transport does not have periodic task that deletes these messages. The only way to remove expired messages is by receiving them.

| Scripted Deployment | Sql Scripts |
| Installers | Optional |
| Native integration | [Supported](native-integration.md) |
| [time-to-be-received](#time-to-be-received) (TTBR) | Storage reclaimed at most 5 minutes after expiration when receiving endpoint is running |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 5 minutes? SQLT has a (disabled by default) feature to remove the expired messages on startup but it runs once (when the endpoint starts), not periodically.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SzymonPobiega because the docs state so: https://docs.particular.net/nservicebus/messaging/discard-old-messages?version=core_7#caveats-sql-transport

The SQL Server transport runs a periodic task that removes expired messages from the queue. The task is first executed when the endpoint starts and is subsequently scheduled to execute 5 minutes after the previous run when the task has been completed. Expired messages are not received from the queue and their disk space will be reclaimed when the periodic task executes.

And as Postgresql uses the same base design I assumed same behavior hence me stating "SQL Transport"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Time-to-be-received

The SQL transport runs a periodic task that removes expired messages from the queue. The task is first executed when the endpoint starts and is subsequently scheduled to execute 5 minutes after the previous run when the task has been completed. Expired messages are not received from the queue and their disk space will be reclaimed when the periodic task executes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not any more. It has been removed because it tended to deadloack with the receive tasks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, good to know since which version this behavior changed. Do you know what major that changed @SzymonPobiega ?

nservicebus/operations/auditing.md Outdated Show resolved Hide resolved
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Pull request has had no activity for 30 days. label Jul 28, 2024
@github-actions github-actions bot closed this Aug 4, 2024
@ramonsmits ramonsmits reopened this Aug 26, 2024
@github-actions github-actions bot removed the stale Pull request has had no activity for 30 days. label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants