# SetMaxSpoolCount

### void SetMaxSpoolCount(uint nMaxSpoolCount)

EZGemPlus에서 스풀(Spool) 기능을 사용할 때, 큐에 저장할 수 있는 최대 메시지 수를 설정합니다. 스풀링된 메시지 수가 이 설정값에 도달하면 SpoolFull 이벤트가 발생하며, 이후의 동작은 EnableSpoolOverwrite 설정에 따라 결정됩니다.

Parameters

<table data-header-hidden><thead><tr><th width="206" valign="top"></th><th width="77" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Name</td><td valign="top">Type</td><td valign="top">Description</td></tr><tr><td valign="top">nMaxSpoolCount</td><td valign="top">uint</td><td valign="top">설정(변경)하고자 하는 값 (Default Max Spool Count = 10)</td></tr></tbody></table>

```csharp
    // 최대 스풀 저장 개수를 5,000개로 설정
    uint maxCount = 5000;
    m_gem.SetMaxSpoolCount(maxCount);

    Console.WriteLine($"최대 스풀 저장 용량이 {maxCount}개로 설정되었습니다.");
    
    // 참고: 이 개수를 초과할 경우의 동작은 EnableSpoolOverwrite() 호출 여부에 따라 달라짐
    // m_gem.EnableSpoolOverwrite(); // 초과 시 오래된 데이터부터 덮어쓰기 활성화
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nviasoft.gitbook.io/nviasoft-docs/api-reference/spool/setmaxspoolcount.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
