Wildfly 18 artemis bridge failover issue
corab500 Jan 21, 2020 7:18 AMHello everyone,
i'm currently facing an issue where my failover on the artemis bridge is correctly reconnecting but after the initial start if the bridge fails to connect, upon first connection all incoming messages are ignored and in the log i see the following warning :
20-01-21 12:32:36,913 INFO [org.apache.activemq.artemis.jms.bridge] (Thread-117) AMQ341000: Failed to set up JMS bridge RemoteBrokerInBridge connections. Most probably the source or target servers are unavailable. Will retry after a pause of 5,000 ms
2020-01-21 12:32:42,137 INFO [org.apache.activemq.artemis.jms.bridge] (Thread-117) AMQ341001: JMS Bridge RemoteBrokerInBridge succeeded in reconnecting to servers
2020-01-21 12:33:49,289 WARN [org.apache.activemq.ActiveMQSessionExecutor] (ActiveMQ Transport: ssl://localhost/127.0.0.1:61616) Received a message on a connection which is not yet started. Have you forgotten to call Connection.start()? Connection: ActiveMQConnection {id=ID:virtualBox-46367-1579605931017-607:1,clientId=ID:virtualBox-46367-1579605931017-606:1,started=false} Received: MessageDispatch {commandId = 0, responseRequired = false, consumerId = ID:virtualBox-46367-1579605931017-607:1:1:1, destination = queue://amq.test.in, message = ActiveMQTextMessage {commandId = 5, responseRequired = true, messageId = ID:virtualBox-43797-1579606353532-6:1:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:virtualBox-43797-1579606353532-6:1:1:1, destination = queue://amq.test.in, transactionId = null, expiration = 0, timestamp = 1579606428975, arrival = 0, brokerInTime = 1579606428983, brokerOutTime = 1579606429122, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@1b4ff930, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false, text = :20:INSTR-MT101
testMessage123
}, redeliveryCounter = 0}
my bridge is configured like this :
<connection-factory name="nonPooledQueueConnectionFactory" entries="java:/jms/BridgeConnectionFactory java:/jms/RemoteInQueueConnectionFactory" connectors="in-vm" factory-type="XA_QUEUE"/>
<jms-bridge name="RemoteBrokerInBridge" module="org.apache.activemqclient" quality-of-service="ONCE_AND_ONLY_ONCE" failure-retry-interval="5000" max-retries="-1" max-batch-size="50" max-batch-time="500">
<source connection-factory="XAConnectionFactory" destination="bridgeToRemoteBrokerInQueue">
<source-context>
<property name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
<property name="java.naming.provider.url" value="failover:(ssl://localhost:61616)?maxReconnectAttempts=0&startupMaxReconnectAttempts=0&updateURIsSupported=false&warnAfterReconnectAttempts=-1"/>
<property name="queue.bridgeToRemoteBrokerInQueue" value="amq.test.in"/>
</source-context>
</source>
<target connection-factory="/jms/BridgeConnectionFactory" destination="/jms/RemoteBrokerInQueue">
<target-context/>
</target>
</jms-bridge>
Does anyone have any idea of what is going wrong?
if i don't use the failover in the url it works as expected. Same if i disconnect from my bridge and i reconnect messages are correctly being consumed.