Skip to content

Commit

Permalink
Merge pull request quarkusio#39406 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 authored Mar 15, 2024
2 parents 6fe55e0 + 0ff3966 commit 916cec3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/src/main/asciidoc/amqp-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,21 @@ You need to indicate the name of the client using the `client-options-name` attr
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.

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

== Health reporting

If you use the AMQP connector with the `quarkus-smallrye-health` extension, it contributes to the readiness and liveness probes.
Expand Down

0 comments on commit 916cec3

Please sign in to comment.