Skip to content

Commit

Permalink
Merge pull request #2528 from mnguetsa/patch-1
Browse files Browse the repository at this point in the history
Improve documentation for AMQP client options about setting a heartbeat
  • Loading branch information
ozangunalp committed Mar 13, 2024
2 parents 00ac1b3 + c8a0625 commit e46c4da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions documentation/src/main/docs/amqp/client-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ connector. You need to indicate the name of the client using the
mp.messaging.incoming.prices.client-options-name=my-named-options
```

If you experience frequent disconnections from the broker, the AmqpClientOptions can also be used to set a heartbeat if you need to keep the AMQP connection permanently.
Some brokers might terminate the AMQP connection after a certain idle timeout.
You can provide a heartbeat value which will be used by the Vert.x proton client to advertise the idle timeout when opening transport to a remote peer.

```java
@Produces
@Identifier("my-named-options")
public AmqpClientOptions getNamedOptions() {
// set a heartbeat of 30s (in milliseconds)
return new AmqpClientOptions()
.setHeartbeat(30000);
}
```

## Client capabilities

Both incoming and outgoing AMQP channels can be configured with a list
Expand Down

0 comments on commit e46c4da

Please sign in to comment.