[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-07-05 Thread Keith Wall (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362269#comment-15362269
 ] 

Keith Wall commented on QPID-6954:
--

Changes look reasonable to me.

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-07-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362252#comment-15362252
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1751426 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1751426 ]

QPID-6954 : Node auto-creation should be done with system privilidges

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-06-27 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351193#comment-15351193
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1750355 from [~k-wall] in branch 'java/trunk'
[ https://svn.apache.org/r1750355 ]

QPID-6954: [Java Broker] Remove commented out test code

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-06-27 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351002#comment-15351002
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1750334 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1750334 ]

QPID-6954 : Fix conversion on getters, add test

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-06-27 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350943#comment-15350943
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1750328 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1750328 ]

QPID-6954 : When converting an ManagedAttributeValue from a map, use the 
labguage defaults for primitive values if the attribute is not in the map

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-06-27 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350927#comment-15350927
 ] 

Rob Godfrey commented on QPID-6954:
---

[~k-wall] On your first point, the function is a converter, not a copier - so I 
actually think the current behaviour is more "correct", however the primary use 
case here is the REST API calling in with a value, or a static default being 
converted - in both cases the map is not going to be changed.  As such I think 
it would be odd to do a deep copy here when we don't otherwise.
On your second point, I agree an NPE is undesirable.  Ideally we should allow 
for metadata driven defaulting, however using the Defaults class as you suggest 
would seem to give the same behaviour - however I think it should probably only 
be used in the case where the key is not present in the map.  If the key is 
present then we should always use the value for the conversion - even if this 
ends up with an NPE.

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-06-27 Thread Keith Wall (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350908#comment-15350908
 ] 

Keith Wall commented on QPID-6954:
--

Rob, the changes look good:

Two comments:

* In 
{{org.apache.qpid.server.model.AttributeValueConverter.ManageableAttributeTypeConverter#convert}}
 the proxy is backed by the Map provided by the caller.If the Map were to 
change later, the MAV would change too and I think this behaviour would be 
surprising.   A deep clone would be most desirable, but this is tricky as the 
Map could contain values of any type, which might not be cloneable.  I think a 
defensive copy of the Map would still be a good idea.

* If the {{ManageableAttributeValue}} has a method that returns a primitive, a 
NPE will occur on line 
org.apache.qpid.server.model.AttributeValueConverter#convert:1183 if the map 
has no value for the attribute or that value is null.  We should guard the 
primitive case and return the primitive default value 
{{com.google.common.base.Defaults}}.



> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-06-27 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350885#comment-15350885
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1750323 from [~k-wall] in branch 'java/trunk'
[ https://svn.apache.org/r1750323 ]

QPID-6954: [Java Broker] Add unit test for AttributeValueConverter for 
ManagedAttributeValue

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-06-24 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15349012#comment-15349012
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1750178 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1750178 ]

QPID-6954 : Address review comments from [~k-wall], add tests and fix some 
issues highlighted by the tests

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2016-06-23 Thread Keith Wall (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346682#comment-15346682
 ] 

Keith Wall commented on QPID-6954:
--

My comments on the implementation:
* {{AbstractVirtualHost#validateNodeAutoCreationPolicy}} - exception messages 
should identify the the NodeAutoCreationPolicy which is at fault. Should 
NodeAutoCreationPolicy have a name?
* VirtualHost#getNodeAutoCreationPolicies attribute has no description
* There are no tests for the feature. I would at least expect a test testing 
the ability to create a queue and an exchange,

And a comment on the feature itself:

* As a user I can auto create message source and message destinations, but I 
can't cause Bindings to come in existence.  Is this a gap?

Finally:

There is no UI or end-user docs for the feature - is this required for 6.1?




> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2015-12-16 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15060141#comment-15060141
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1720368 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1720368 ]

QPID-6954 : Ensure durable queues are actually stored

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2015-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15058806#comment-15058806
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1720249 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1720249 ]

QPID-6954 : Refactor to remove code duplication

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2015-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15058768#comment-15058768
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1720244 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1720244 ]

QPID-6954 : Revert inadvertantly committed files

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-6954) [Java Broker] Add the ability to define "policies" for node auto-creation based on address

2015-12-15 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15058766#comment-15058766
 ] 

ASF subversion and git services commented on QPID-6954:
---

Commit 1720243 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1720243 ]

QPID-6954 : Add the ability to define "policies" for node auto-creation based 
on address

> [Java Broker] Add the ability to define "policies" for node auto-creation 
> based on address
> --
>
> Key: QPID-6954
> URL: https://issues.apache.org/jira/browse/QPID-6954
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Rob Godfrey
>Assignee: Rob Godfrey
> Fix For: qpid-java-6.1
>
>
> See: [this 
> mail|http://mail-archives.apache.org/mod_mbox/qpid-users/201512.mbox/%3C55CF1C5A18D1B84CAE275B17381A7C6CC174E2825B%40winavi5.AviFN.local%3E]
>  and QPID-5251 (C++ Broker equivalent).
> It is sometimes useful to be able to provide behaviours based on 
> namespaces/patterns such that queues/exchanges which match those patterns get 
> automatically created.
> Add a new property to the virtualHost called "nodeAutoCreationPolicies", 
> which is a list of polices.  A policy is an object with attributes "pattern", 
> "nodeType", "createdOnPublish", "createdOnConsume" and "attributes".
> * pattern is a Java RegExp which will be matched against the name used by the 
> client for an incoming published message / consume request.
> * nodeType is one of "queue" or "exchange".
> * createdOnPublish is a boolean indicating whether the node should be created 
> when new messages are published (or an incoming link is created)
> * createdOnConsume is a boolean indicating whether the node should be created 
> when a new consumer is created
> * attributes is a map, containing the default attributes of the node to be 
> created.  These attributes are the same used in the REST API for the node 
> type.
> The nodeAutoCreationPolicies can be set via the REST API, or (if you are 
> using a JSON VirtualHostNode) by hand editing the virtualHost configuration.
> For instance here is a snippet from a JSON virtualHost configuration with 
> defined nodeAutoCreationPolicies:
> {code:javascript}
> {
>   "id" : "134c0b84-b1b2-46c8-ba2d-f05ba13be56f",
>   "name" : "default",
>   "type" : "BDB",
>   "modelVersion" : "6.1",
>   "nodeAutoCreationPolicies" : [ {
> "pattern" : "rob\\.durable\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : true,
> "nodeType" : "queue",
> "attributes" : {
>   "durable" : true
> }
>   }, {
> "pattern" : "rob\\.exchange\\..*",
> "createdOnPublish" : true,
> "createdOnConsume" : false,
> "nodeType" : "exchange",
> "attributes" : {
>   "type" : "direct",
>   "durable" : true
> }
>   } ],
>   "queue.deadLetterQueueEnabled" : false,
>   "exchanges" : [ {
> "id" : "5fcbd3f5-fe7c-4ab0-9605-950d7784844c",
> "name" : "amq.direct",
> "type" : "direct"
>   }, {
> "id" : "3f17dd6f-269b-43a6-868e-dd487271719a",
> "name" : "amq.fanout",
> "type" : "fanout"
>   }, {
> "id" : "45e9eba0-3bcc-4634-b042-87a652447cbe",
> "name" : "amq.match",
> "type" : "headers"
>   }, {
> "id" : "d7b703c4-0d64-4a44-8008-1314a18e30e7",
> "name" : "amq.topic",
> "type" : "topic"
>   } ],
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org