You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Hartmut Horrer (Jira)" <ji...@apache.org> on 2023/03/13 12:30:00 UTC
[jira] [Comment Edited] (ARTEMIS-4204) Connector and Bridge Configurations via REST Jolokia API are not Durable
[ https://issues.apache.org/jira/browse/ARTEMIS-4204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17699601#comment-17699601 ]
Hartmut Horrer edited comment on ARTEMIS-4204 at 3/13/23 12:29 PM:
-------------------------------------------------------------------
{{Hi,}}
{{yes you are right, - the bridge stays durable (sorry for the wrong information).}}
{{But the bridge cannot be setup after restart because the connector is not there anymore.}}
The log shows it:
{{2023-03-13 11:56:04,347 WARN [org.apache.activemq.artemis.core.server] AMQ222226: Connection configuration is null for connectorName connector-1}}
{{2023-03-13 11:56:04,347 WARN [org.apache.activemq.artemis.core.server] AMQ222175: Bridge bridge-1 could not find configured connectors}}
h3. Conclusion:
* Only the connectors are transient.
* {{Bridges are durable.}}
h3. {{Again the Question:}}
* {{Will there be a chance to allocate the Connectors in a durable mode without modifying the broker.xml?}}
* {{Our problem is that we want to create new broker environments and connect them by bridges on-the-fly.}}
* {{If you decline, we will have to find another solution.}}
{{Thank you.}}
{{The HTTP Script containing the calls to reproduce (two Artemis instances , one with the default ports and the second with port offset 10):}}
###
POST http://127.0.0.1:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false
Content-Type: application/json
Authorization: Basic \{{user}} \{{password}}
{
"type": "exec",
"mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\"",
"operation": "createQueue(java.lang.String,java.lang.String,boolean,java.lang.String)",
"arguments": [
"test-bridge-source",
"test-bridge-source",
true,
"ANYCAST"
]
}
###
POST http://127.0.0.1:8171/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false
Content-Type: application/json
Authorization: Basic \{{user}} \{{password}}
{
"type": "exec",
"mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\"",
"operation": "createQueue(java.lang.String,java.lang.String,boolean,java.lang.String)",
"arguments": [
"test-bridge-target",
"test-bridge-target",
true,
"ANYCAST"
]
}
###
POST http://127.0.0.1:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false
Content-Type: application/json
Authorization: Basic \{{user}} \{{password}}
{
"type": "exec",
"mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\"",
"operation": "addConnector(java.lang.String,java.lang.String)",
"arguments": [
"connector-1",
"tcp://localhost:61626"
]
}
###
POST http://127.0.0.1:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false
Content-Type: application/json
Authorization: Basic \{{user}} \{{password}}
{
"type": "exec",
"mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\"",
"operation": "createBridge(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,long,double,int,int,boolean,int,long,java.lang.String,boolean,boolean,java.lang.String,java.lang.String)",
"arguments": [
"bridge-1",
"test-bridge-source",
"test-bridge-target",
"",
"",
1000,
"1.0",
10,
-1,
false,
10000000,
30000,
"connector-1",
false,
false,
"artemis",
"artemis"
]
}
###
POST http://127.0.0.1:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false
Content-Type: application/json
Authorization: Basic \{{user}} \{{password}}
{
"type": "exec",
"mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\",component=addresses,address=\"test-bridge-source\",subcomponent=queues,routing-type=\"anycast\",queue=\"test-bridge-source\"",
"operation": "sendMessage(java.util.Map,int,java.lang.String,boolean,java.lang.String,java.lang.String)",
"arguments": [
"{}",
3,
"\"test message 1\"",
true,
"artemis",
"artemis"
]
}
was (Author: JIRAUSER289738):
{{Hi,}}
{{yes you are right, - the bridge stays durable (sorry for the wrong information).}}
{{But the bridge cannot be setup after restart because the connector is not there anymore.}}
The log shows it:
{{2023-03-13 11:56:04,347 WARN [org.apache.activemq.artemis.core.server] AMQ222226: Connection configuration is null for connectorName connector-1}}
{{2023-03-13 11:56:04,347 WARN [org.apache.activemq.artemis.core.server] AMQ222175: Bridge bridge-1 could not find configured connectors}}
h3. {{Conclusion: }}
* {{Only the connectors are transient. }}
* {{Bridges are durable.}}
h3. {{Again the Question:}}
* {{Will there be a chance to allocate the Connectors in a durable mode without modifying the broker.xml?}}
* {{Our problem is that we want to create new broker environments and connect them by bridges on-the-fly.}}
* {{If you decline, we will have to find another solution.}}
{{Thank you.}}
{{The HTTP Script containing the calls to reproduce (two Artemis instances , one with the default ports and the second with port offset 10):}}
{{{}###{}}}{{{}POST http://127.0.0.1:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false{}}}
{{Content-Type: application/json}}
{{{}Authorization: Basic \{{user}} \{{password}}{}}}{{{}{{}}}
{{ "type": "exec",}}
{{ "mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\"",}}
{{ "operation": "createQueue(java.lang.String,java.lang.String,boolean,java.lang.String)",}}
{{ "arguments": [}}
{{ "test-bridge-source",}}
{{ "test-bridge-source",}}
{{ true,}}
{{ "ANYCAST"}}
{{ ]}}
{{{}}{}}}{{{}{}}}{{{}###{}}}{{{}POST http://127.0.0.1:8171/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false{}}}
{{Content-Type: application/json}}
{{{}Authorization: Basic \{{user}} \{{password}}{}}}{{{}{{}}}
{{ "type": "exec",}}
{{ "mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\"",}}
{{ "operation": "createQueue(java.lang.String,java.lang.String,boolean,java.lang.String)",}}
{{ "arguments": [}}
{{ "test-bridge-target",}}
{{ "test-bridge-target",}}
{{ true,}}
{{ "ANYCAST"}}
{{ ]}}
{{{}}{}}}{{{}###{}}}{{{}POST http://127.0.0.1:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false{}}}
{{Content-Type: application/json}}
{{{}Authorization: Basic \{{user}} \{{password}}{}}}{{{}{{}}}
{{ "type": "exec",}}
{{ "mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\"",}}
{{ "operation": "addConnector(java.lang.String,java.lang.String)",}}
{{ "arguments": [}}
{{ "connector-1",}}
{{ "tcp://localhost:61626"}}
{{ ]}}
{{{}}{}}}{{{}{}}}{{{}###{}}}{{{}POST http://127.0.0.1:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false{}}}
{{Content-Type: application/json}}
{{{}Authorization: Basic \{{user}} \{{password}}{}}}{{{}{{}}}
{{ "type": "exec",}}
{{ "mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\"",}}
{{ "operation": "createBridge(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,long,double,int,int,boolean,int,long,java.lang.String,boolean,boolean,java.lang.String,java.lang.String)",}}
{{ "arguments": [}}
{{ "bridge-1",}}
{{ "test-bridge-source",}}
{{ "test-bridge-target",}}
{{ "",}}
{{ "",}}
{{ 1000,}}
{{ "1.0",}}
{{ 10,}}
{{ -1,}}
{{ false,}}
{{ 10000000,}}
{{ 30000,}}
{{ "connector-1",}}
{{ false,}}
{{ false,}}
{{ "artemis",}}
{{ "artemis"}}
{{ ]}}
{{{}}{}}}{{{}{}}}{{{}###{}}}{{{}POST http://127.0.0.1:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=true&canonicalNaming=false{}}}
{{Content-Type: application/json}}
{{{}Authorization: Basic \{{user}} \{{password}}{}}}{{{}{{}}}
{{ "type": "exec",}}
{{ "mbean": "org.apache.activemq.artemis:broker=\"broker-p5q\",component=addresses,address=\"test-bridge-source\",subcomponent=queues,routing-type=\"anycast\",queue=\"test-bridge-source\"",}}
{{ "operation": "sendMessage(java.util.Map,int,java.lang.String,boolean,java.lang.String,java.lang.String)",}}
{{ "arguments": [}}
{{ "{}",}}
{{ 3,}}
{{ "\"test message 5\"",}}
{{ true,}}
{{ "artemis",}}
{{ "artemis"}}
{{ ]}}
{{}}}
> Connector and Bridge Configurations via REST Jolokia API are not Durable
> ------------------------------------------------------------------------
>
> Key: ARTEMIS-4204
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4204
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: 2.28.0
> Reporter: Hartmut Horrer
> Priority: Major
>
> We are using the REST - Jolokia JMX Bridge interface to configure some connectors (addConnector) and bridges (createBridge()).
> After restarting the Artemis instance all these configurations are lost. Is there any way to
> get the static connectors and bridges durable by using the REST API?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)