Skip to content

Commit

Permalink
Classify more exceptions as unser indicated errors
Browse files Browse the repository at this point in the history
* mqtt hive mq throws a NativeIoException when the address is somehow
  invalid
* http throws UnexpectedConnectionClosureException when the server
  closes the connection. This happens most likely because of a
  too high max idle time for the conneciton pool
* http throws a StreamTcpException stating that the Connection was reset by peer.
  This is not a ditto fault and therefore should not be treated as failure

Signed-off-by: Yannic Klem <yannic.klem@bosch.io>
  • Loading branch information
Yannic92 committed Nov 30, 2021
1 parent 5d2a4e2 commit 1061147
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions connectivity/service/src/main/resources/connectivity.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ditto {
{exceptionName: "org.apache.kafka.common.errors.SslAuthenticationException", messagePattern: ".*"}
# MQTT
{exceptionName: "com.hivemq.client.mqtt.exceptions.ConnectionClosedException", messagePattern: "Server closed connection without DISCONNECT.*"}
{exceptionName: "com.hivemq.client.mqtt.exceptions.ConnectionClosedException", messagePattern: "io.netty.channel.unix.Errors$NativeIoException.*"}
# MQTT 3.1.1 - treat error codes from the broker as user indicated errors
{exceptionName: "com.hivemq.client.mqtt.mqtt3.exceptions.Mqtt3ConnAckException", messagePattern: ".*"}
{exceptionName: "com.hivemq.client.mqtt.mqtt3.exceptions.Mqtt3DisconnectException", messagePattern: ".*"}
Expand Down Expand Up @@ -55,6 +56,8 @@ ditto {
{exceptionName: "org.apache.qpid.jms.provider.exceptions.ProviderInvalidDestinationException", messagePattern: ".*"}
# HTTP
{exceptionName: "org.eclipse.ditto.jwt.model.JwtInvalidException", messagePattern: ".*"}
{exceptionName: "akka.http.impl.engine.client.OutgoingConnectionBlueprint.UnexpectedConnectionClosureException", messagePattern: ".*"}
{exceptionName: "akka.stream.StreamTcpException", messagePattern: ".*Connection reset by peer.*"}
# Common cert exceptions
{exceptionName: "java.security.cert.CertificateException", messagePattern: ".*"}
{exceptionName: "java.security.cert.CertPathValidatorException", messagePattern: ".*"}
Expand Down

0 comments on commit 1061147

Please sign in to comment.