Hi everyone,
I'm stuck with testing RabbitMQ Streams with Java client, so perhaps some expert here can point me to the right direction... :)
So I have simple SpringBoot app which on the one hand uses Debezium to read events from Postgress DB and then tries to send these messages to RMQ Stream. Mostly I'm following the official example for Java client. So the code seems to properly instantiate connection to RMQ cluster, then creates the stream and the producer. I can see empty stream like that:
But when I try to post messages with publishsingId it fails with exception: java.lang.IllegalStateException: The producer has no connection at the line where I'm trying to get the previous Id: nextPublishingId = producer.getLastPublishingId() + 1; , here is the code snippet:
and here is how I initialize all of it:
I'm using RabbitMQ 3.10 and Java Client 0.6.0.
Perhaps I'm missing something. Even if I remove getLastPublishingId() then send shows no errors, but these sent messages are not confirmed and when checking the stream it remains empty, so somehow my messages are not received by the cluster.
Any hints are appreciated!