# GetSpoolCountActual

### int GetSpoolCountActual()

현재 스풀 저장소에 실제로 저장되어 있는 메시지의 정확한 총 개수를 반환합니다. 통신 단절 시 데이터 유실 없이 보관된 메시지 파악을 위해 사용하며, `GetSpoolCount`보다 더 즉각적이고 물리적인 수치를 확인하고자 할 때 호출합니다.

Return Value

<table data-header-hidden><thead><tr><th width="187" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Value</td><td valign="top">Description</td></tr><tr><td valign="top">0</td><td valign="top">Spool에 남아있는 메시지가 없음</td></tr><tr><td valign="top">>=1</td><td valign="top">Spool에 남아있는 메시지 수</td></tr></tbody></table>

```csharp
// 실제 저장소에 기록된 스풀 개수를 정밀하게 확인
    int actualCount = m_gem.GetSpoolCountActual();

    if (actualCount >= 0)
    {
        Console.WriteLine($"[정밀 모니터링] 실제 스풀링된 메시지: {actualCount} 개");
        
        // 스풀링 개수가 0이면 모든 데이터가 호스트로 전송 완료된 상태임
        if (actualCount == 0)
        {
            Console.WriteLine("모든 스풀 메시지가 성공적으로 전송되었습니다.");
        }
    }
    else
    {
        Console.WriteLine($"스풀 개수 확인 중 오류 발생: {actualCount}");
    }
```


---

# 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/getspoolcountactual.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.
