I am trying to use MDB
to connect a wildfly 10 server using the inbuilt ActiveMQ Artemis to connect to my standalone ActiveMQ-Server running version 5.13.3. It seems like Artemis is not able to communicate with any of the supported ActiveMQ-Protocols.
ActiveMQ standalone broker has the following transportConnectors
:
<transportConnectors>
<transportConnector name="auto" uri="auto://localhost:5671?protocolDetectionTimeOut=5000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="http" uri="http://0.0.0.0:8180?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600" />
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
</transportConnectors>
Wildfly MessageBean has the following Annotation
:
@MessageDriven(activationConfig =
{
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", "TestDestination"),
@ActivationConfigProperty(propertyName="clientID", propertyValue = "test"),
@ActivationConfigProperty(propertyName="connectionParameters", propertyValue = "host=127.0.0.1;port=5671"),
@ActivationConfigProperty(propertyName="connectorClassName", propertyValue = "org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory"),
@ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="Auto-acknowledge")
}, mappedName = "TestDestination")
public class MessageProcessingBean implements MessageListener {
Depending on the connector I choose to connect to, I receive different error-messages on the ActiveMQ-Server.
Connecting to the auto
-endpoint yields the following message:
ERROR | Could not accept connection : java.lang.IllegalStateException: Could not detect the wire format
No error on the wildfly-side.
Connection to the Openwire
-endpoint yields the following message:
WARN | Transport Connection to: tcp://127.0.0.1:45000 failed: java.io.IOException: Unknown data type: 77
this also yields an error on the wildfly-side:
17:04:23,384 ERROR [org.apache.activemq.artemis.core.client] (Thread-16 (ActiveMQ-client-netty-threads-1716275972)) > AMQ214013: Failed to decode packet: java.lang.IllegalArgumentException: AMQ119032: Invalid type: 1 at org.apache.activemq.artemis.core.protocol.core.impl.PacketDecoder.decode(PacketDecoder.java:413) at org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:60) at org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:39) at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:324) at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1105) at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:68) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) at java.lang.Thread.run(Thread.java:745)
I could go so on and receive errormessages on all endpoints. The result in fact is that ActiveMQ-Artemis is sending in a data format which is not supported by ActiveMQ.
Which steps have to be taken to connect ActiveMQ-Artemis with a standalone ActiveMQ-Server?