---
title: "queryQueueActivity(_:withCompletionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatchmaker/queryqueueactivity(_:withcompletionhandler:)"
---

# queryQueueActivity(_:withCompletionHandler:)

Finds the number of players in a specific queue who recently requested a match.

## Declaration

```swift
func queryQueueActivity(_ queueName: String, withCompletionHandler completionHandler: (@Sendable (Int, (any Error)?) -> Void)? = nil)
```

```swift
func queryQueueActivity(_ queueName: String) async throws -> Int
```

## Parameters

- `queueName`: The name of the queue that Game Center places the match requests in, which it uses for finding players when using matchmaking rules. This uniform type identifier (UTI) contains only alphanumeric characters (A-Z, a-z, 0-9), hyphens (-), or periods (.). The string should be in reverse-DNS format and queue names are case sensitive.
- `completionHandler`: The block that GameKit calls when it completes the request. This block receives the following parameters:

## Discussion

Discussion To specify a queue name when requesting a match, set the GKMatchRequest queueName property. For more information, see Matchmaking rules.

## See Also

### Finding players who request matches

- [queryActivity(completionHandler:)](gamekit/gkmatchmaker/queryactivity(completionhandler:).md)
- [queryPlayerGroupActivity(_:withCompletionHandler:)](gamekit/gkmatchmaker/queryplayergroupactivity(_:withcompletionhandler:).md)
