Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs-java/features/connectivity/001-btp-destination-service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,20 @@ If that behavior is not desired, you may disable the change detection mode:
```java
DestinationService.Cache.disableChangeDetection();
```

### Destination PreLookup Check

In order to decrease the amount of unnecessary calls to non-existent destinations, the `DestinationService` performs a pre-lookup check when calling a single destination through `tryGetDestination()` by default.
This check first searches for the desired destination in the list of all available destinations (via a call to `DestinationService.getAllDestinationProperties`).
It will fail the `tryGetDestination` call without actually calling the destination directly if the destination is not present in the response of `DestinationService.getAllDestinationProperties`.

:::info Regarding Fragments
This check does not account for fragments.
A non-existing fragment will still lead to an HTTP call and subsequent `DestinationNotFoundException` unless the additional header `{@code X-fragment-optional: true}` is set via `DestinationOptions`.
:::

If that behavior is not desired it can disabled via

```java
DestinationService.Cache.disablePreLookupCheck();
```