---
title: "max(_:)"
framework: combine
role: symbol
role_heading: Type Method
path: "combine/subscribers/demand/max(_:)"
---

# max(_:)

Creates a demand for the given maximum number of elements.

## Declaration

```swift
static func max(_ value: Int) -> Subscribers.Demand
```

## Parameters

- `value`: The maximum number of elements. Providing a negative value for this parameter results in a fatal error.

## Discussion

Discussion The publisher is free to send fewer than the requested maximum number of elements.
