0

I am using Quarkus to proxy request to another REST service. Everything works fine when the downstream service is running. When I shutdown the downstream and send request, for example a curl request, through Quarkus the first request gets stuck, and for all other further curl requests I get the below error and system never recovers even after the downstream service comes back.

Request failed: java.lang.IllegalStateException: SRMSG00028: The subscription to events has been cancelled

I use org.eclipse.microprofile.reactive.messaging.Emitter and org.eclipse.microprofile.reactive.messaging.Channel.

How do I handle such situations ? I expect the curl request to timeout when the downstream service is down and once the service starts back I should be getting 200 Ok responses instead ofabove "IIlegalStateException he subscription to events has been cancelled".

May be I am missing something simple, but I couldn't find anything in Quarkus documentation related to this. Please advice.

Thank you,

anaray
  • 309
  • 1
  • 8

1 Answers1

1

I was using smallrye-http connector.

mp.messaging.outgoing.metrics.connector=smallrye-http
mp.messaging.outgoing.metrics.method=POST
mp.messaging.outgoing.metrics.url=http://localhost:9090/test

Instead use

mp.messaging.outgoing.metrics.connector=quarkus-http
mp.messaging.outgoing.metrics.method=POST
mp.messaging.outgoing.metrics.url=http://localhost:9090/test

This will solve the issue. Thanks Quarkus team for the guidance. More details https://github.com/quarkusio/quarkus/issues/15344

anaray
  • 309
  • 1
  • 8