Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emitter AMQP protocol stucked after MQ broker restart #40592

Open
bkalas opened this issue May 13, 2024 · 4 comments
Open

Emitter AMQP protocol stucked after MQ broker restart #40592

bkalas opened this issue May 13, 2024 · 4 comments
Labels

Comments

@bkalas
Copy link

bkalas commented May 13, 2024

Describe the bug

we are using Emitters for sending message to remote MQ broker.
Normally without any OnOverflow annotation
@Inject @Channel(RESPONSE_QUEUE) Emitter<String> emitter; ... public void emit(Message<String> toEmit) { this.emitter.send(toEmit); ...
Few times we observed situation that if remote broker was restarted, emiting of messages stopped working.
For few x (~100) messages we didnt get any errror (i guess x= default size of buffer),
then we started to get errror
java.lang.IllegalStateException: SRMSG00034: Insufficient downstream requests to emit item
This was only solved by quarkus app restart.
Health report for channel was all time showing OK status.

We are also using a lot of consumers (@Incoming ) of amqp messages, this were susccessfully reconnected and continue to work.

Whn i try to use for example
@OnOverflow(FAIL, bufferSize = 100)
it at least discnnected after error from channel and started reporting KO in health check, but here bufferSize seems to be ignored, so it is not usable.

Expected behavior

Emitting channel must be resilient against remote broker restart and must continue to emit messages.

Actual behavior

Sometimes restarts of remote broker was handled ok, but noit always.

How to Reproduce?

  1. must have installed amq broker (in our case Redhat AMQ7.11)
  2. quarkus app with Emitter to some queue in remote broker
  3. emit messages in some intervlas and restart broker.
  4. for me always ~6 restart of broker was enough to simulate this issue, that aftger one of this restarts no new message ws emitted.

Output of uname -a or ver

No response

Output of java -version

17

Quarkus version or git rev

2.16.12.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@quarkus-bot
Copy link

quarkus-bot bot commented May 13, 2024

/cc @cescoffier (reactive-messaging), @ozangunalp (reactive-messaging)

@ozangunalp
Copy link
Contributor

Looks like an issue with the send-retry mechanism on the AMQP connector. It doesn't reconnect the client and keeps retrying with the previous (unconnected) sender.

I have a fix in mind but I need to be able to reproduce this scenario (in the test environment) to test it.

@MikkoKauhanen
Copy link

Hi,

If it helps at all I created quick and dirty test to try to reproduce the issue which you can find from link to the repo. This test uses Quarkus 3.10.1.

We have same problem in our services that use quarkus version 3.5.3. In our emitters we have @OnOverflow(OnOverflow.Strategy.UNBOUNDED_BUFFER) as a strategy.

Here is also link to my msg about my findings related to this issue: link to comment

@ozangunalp
Copy link
Contributor

@MikkoKauhanen Thanks for this, I'll check it later today or at the beginning of next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants