# SubjectAnnouncement

Type: SubjectAnnouncement

Settings for announcements to be made about the subject.

Schema: [SubjectAnnouncement](https://sourcey-ditto.pages.dev/http-api-doc/models/subjectannouncement.md)

Example:

```json
{
  "beforeExpiry": "5m",
  "whenDeleted": true,
  "randomizationInterval": "5m"
}
```

- `beforeExpiry` (optional)
  Type: string
  
  The duration before expiry when an announcement should be made.
  Must be a positive integer followed by one of `h` (hour), `m` (minute) or `s` (second).

- `whenDeleted` (optional)
  Type: boolean
  
  Whether an announcement should be made when this subject is deleted.

- `requestedAcks` (optional)
  Type: object
  
  Settings to enable at-least-once delivery for policy announcements.
  
  Example:
  
  ```json
  {
    "labels": [
      "my-connection-id:my-issued-acknowledgement"
    ],
    "timeout": "5s"
  }
  ```
  
  - `labels` (optional)
    Type: Array<string>
    
    Acknowledgement labels to request when an announcement is published.
    
    Items:
      Type: string
  
  - `timeout` (optional)
    Type: string
    
    How long to wait for requested announcements before retrying publication of an announcement.

- `randomizationInterval` (optional)
  Type: string
  
  Interval in which the announcement can be sent earlier than the configured `beforeExpiry`. The actual point in time when the announcement will be sent is `beforeExpire` plus a randomly chosen time within the `randomizationInterval`. E.g assuming `beforeExpiry` is set to 5m and `randomizationInterval` is set to 1m, the announcements will be sent between 5 and 6 minutes before the subject expires. If omitted, the default value will be applied. If set to minimum, no randomization will be applied.
  
  default: "5m"