Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Defining and deploying a simple core bridge results in an exception. For example:
server.deployBridge(new BridgeConfiguration() .setName("myBridge") .setQueueName("myQueue") .setForwardingAddress("myFowardingAddress") .setStaticConnectors(List.of("in-vm")));
Results in this:
[Thread-0 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@1fb19a0)] 12:08:53,386 WARN [org.apache.activemq.artemis.core.server] AMQ222099: Bridge BridgeImpl@d3cc2c1 [name=myBridge, queue=QueueImpl[name=myQueue, postOffice=PostOfficeImpl [server=ActiveMQServerImpl::serverUUID=09d8c4ef-6714-11eb-b80b-5c80b6f32172], temp=false]@3b365709 targetConnector=ServerLocatorImpl (identity=Bridge myBridge) [initialConnectors=[TransportConfiguration(name=09bc3c3e-6714-11eb-b80b-5c80b6f32172, factory=org-apache-activemq-artemis-core-remoting-impl-invm-InVMConnectorFactory) ?serverId=0], discoveryGroupConfiguration=null]] is unable to connect to destination. It will be disabled.: java.lang.IllegalStateException: You can't set confirmationHandler on a connection with confirmation-window-size < 0. Look at the documentation for more information. at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.setCommandConfirmationHandler(ChannelImpl.java:592) at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.setHandlers(ActiveMQSessionContext.java:194) at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.setSendAcknowledgementHandler(ActiveMQSessionContext.java:275) at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.setSendAcknowledgementHandler(ClientSessionImpl.java:1364) at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.setSendAcknowledgementHandler(ClientSessionImpl.java:62) at org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.connect(BridgeImpl.java:1020) at org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl$ConnectRunnable.run(BridgeImpl.java:1189) at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
The only way to work around this is to manually set the confirmation window size on the bridge configuration.
Bridges deployed via broker.xml don't suffer from this problem because the confirmation window size is set to the proper default value.
Attachments
Issue Links
- links to