Hi there! I am developing Spring Framework client based on the QPid ProtonJ 2 Client: https://github.com/spring-projects/spring-amqp/tree/main/spring-amqp-client/src .
One of my tests is sporadically failing like:
Caused by: java.lang.IllegalStateException: Cannot create new Receiver from
closed Session
at org.apache.qpid.protonj2.engine.impl.ProtonSession.checkSessionClosed
(ProtonSession.java:670)
at org.apache.qpid.protonj2.engine.impl.ProtonSession.receiver
(ProtonSession.java:396)
at org.apache.qpid.protonj2.engine.impl.ProtonSession.receiver
(ProtonSession.java:59)
at org.apache.qpid.protonj2.client.impl.ClientReceiverBuilder.createReceiver
(ClientReceiverBuilder.java:142)
at org.apache.qpid.protonj2.client.impl.ClientReceiverBuilder.receiver
(ClientReceiverBuilder.java:61)
at org.apache.qpid.protonj2.client.impl.ClientSession.internalOpenReceiver
(ClientSession.java:391)
at org.apache.qpid.protonj2.client.impl.ClientConnection.
lambda$openReceiver$3(ClientConnection.java:279)
at io.netty.util.concurrent.AbstractEventExecutor.runTask
(AbstractEventExecutor.java:148)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute
(AbstractEventExecutor.java:141)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks
(SingleThreadEventExecutor.java:535)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:405)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run
(SingleThreadEventExecutor.java:1195)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
I have a single connection object per test suite lifecycle.
The code I try to create a Receiver is like:
ClientReceiver receiver =
(ClientReceiver) connection.openReceiver(queue, receiverOptions)
.addCredit(this.initialCredits);
Which apparently leads to the shared internal session in that connection.
The broker I test against is RabbitMQ 4.2.
So, the question is: if I'm doing something wrong or missing anything.
I also do have a reconnectEnabled on the connection.
Please, let me know if you need anything else.
Thank you!
Regards,
Artem Bilan
smime.p7s
Description: S/MIME Cryptographic Signature
