I'm facing an issue when using the AMQP connector and an Apache Artemis
broker and I'm not sure if it's an error on my part somehow or one of the
two doesn't handle this case properly

Problem: I send a message to the broker using an emitter, if the target
address does not have a queue the broker will log the error:
Couldn't find any bindings for address=random-address on
message=AMQPStandardMessage......
The message is never sent to any queue and is lost, but the emitter does
not NACK the message nor it reports any error on the quarkus CLI



How to reproduce:

Start the apache artemis container:
```
docker pull quay.io/artemiscloud/activemq-artemis-broker:artemis.2.27.1
docker run -d -p 8161:8161 -p 61616:61616 -e AMQ_USER=artemis -e
AMQ_PASSWORD=artemis -e AMQ_EXTRA_ARGS: "--host 0.0.0.0 --http-host 0.0.0.0
--relax-jolokia" quay.io/artemiscloud/activemq-artemis-broker:artemis.2.27.1
```

The console is accessible at localhost:8161 with credentials artemis/artemis
You should also go to JMX -> org.apache.logging.log4j2 ->
org.apache.activemq logger and set the log level to DEBUG


Run the message producer:
clone https://github.com/quarkusio/quarkus-quickstarts
cd  .\amqp-quickstart
update the properties file
.\amqp-quickstart\amqp-quickstart-producer\src\main\resources\application.properties
by adding these properties:
```
amqp-host=localhost
amqp-port=61616
amqp-username=artemis
amqp-password=artemis

mp.messaging.outgoing.quote-requests.connector=smallrye-amqp
mp.messaging.outgoing.quote-requests.address=random-address
mp.messaging.outgoing.quote-requests.durable=true
```

Run the producer:
`mvn -f amqp-quickstart-producer quarkus:dev`

Now you can send a message to the artemis broker by sending a post request
to http://localhost:8080/quotes/request

You could also update the QuotesResource.java class by checking the emitter
result like this:
```
CompletionStage<Void> completionStage =
quoteRequestEmitter.send(uuid.toString()); // <2>
completionStage.toCompletableFuture().join();
```

but it's the same thing, no error is reported

Reply via email to