I've got a Java RabbitMQ producer application, and I want to send some messages on ActiveMQ from Amazon MQ (I've created the broker). I follow the step from this page.
I made the Java example for RabbitMQ, at first it seems fine but when I create the connection to my Endpoint (username and password too): amqps://x-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-x.xx.xx-xxxx-x.amazonaws.com:5671
in this line:
factory.newConnection();
I've got these error:
Error in the internal library:
[AMQP Connection xx.xx.xx.xx:5671] ERROR com.rabbitmq.client.impl.ForgivingExceptionHandler - An unexpected connection driver error occured
com.rabbitmq.client.MalformedFrameException: AMQP protocol version mismatch; we are version 0-9-1, server sent signature 3,1,0,0
at com.rabbitmq.client.impl.Frame.protocolVersionMismatch(Frame.java:170)
at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:107)
at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:184)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:645)
at java.lang.Thread.run(Thread.java:745)
Error I've caught up:
null com.rabbitmq.client.ShutdownSignalException: connection error
I understand the principal error was the mismatch version, but is there a way to fix it by changing the version protocol or it is not possible?
Because RabbitMQ uses AMQP 0-9 in the example.