Re: [camel] 01/01: azure-servicebus subscriptionName is required by it's consumer
Thanks for your feedback. I verified it for queue and indeed subscriptionName is not required. It’s only required for topics. I have reverted the commit. Babak > On 28 Mar 2022, at 11:28, Andrea Cosentino wrote: > > Also, If you use a queue and not a topic, the subscriptionName is not > mandatory. > > I think we should revert this. > > Il giorno lun 28 mar 2022 alle ore 08:59 Claus Ibsen > ha scritto: > >> Hi Babak >> >> Did you consider that the producer may not require this parameter? And >> if so then it cannot be marked as required. >> You can only add this in its documentation, and have some code that >> checks when creating the consumer that the option is present. >> >> It's a limitation with @UriParam that we cannot mark things as >> required only for consumer vs producer. >> >> On Mon, Mar 28, 2022 at 1:07 AM wrote: >>> >>> This is an automated email from the ASF dual-hosted git repository. >>> >>> bvahdat pushed a commit to branch azure-servicebus-subscriptionName >>> in repository https://gitbox.apache.org/repos/asf/camel.git >>> >>> commit 334f1c3e8d3aeef287548f168379e7c62da975b6 >>> Author: Babak Vahdat >>> AuthorDate: Mon Mar 28 01:04:57 2022 +0200 >>> >>>azure-servicebus subscriptionName is required by it's consumer >>> --- >>> .../org/apache/camel/catalog/components/azure-servicebus.json | >> 4 ++-- >>> .../org/apache/camel/component/azure/servicebus/azure-servicebus.json | >> 4 ++-- >>> .../camel/component/azure/servicebus/ServiceBusConfiguration.java | >> 1 + >>> .../camel/builder/endpoint/dsl/ServiceBusEndpointBuilderFactory.java | >> 1 + >>> 4 files changed, 6 insertions(+), 4 deletions(-) >>> >>> diff --git >> a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json >> b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json >>> index bb91029..a20b0e5 100644 >>> --- >> a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json >>> +++ >> b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json >>> @@ -37,7 +37,7 @@ >>> "receiverAsyncClient": { "kind": "property", "displayName": >> "Receiver Async Client", "group": "consumer", "label": "consumer", >> "required": false, "type": "object", "javaType": >> "com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient", >> "deprecated": false, "deprecationNote": "", "autowired": true, "secret": >> false, "configurationClass": >> "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", >> "configurationField": "configuration", "description": "Sets the receiverAsy >> [...] >>> "serviceBusReceiveMode": { "kind": "property", "displayName": >> "Service Bus Receive Mode", "group": "consumer", "label": "consumer", >> "required": false, "type": "object", "javaType": >> "com.azure.messaging.servicebus.models.ServiceBusReceiveMode", "enum": [ >> "PEEK_LOCK", "RECEIVE_AND_DELETE" ], "deprecated": false, "autowired": >> false, "secret": false, "defaultValue": "PEEK_LOCK", "configurationClass": >> "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", >> "configurationFie [...] >>> "subQueue": { "kind": "property", "displayName": "Sub Queue", >> "group": "consumer", "label": "consumer", "required": false, "type": >> "object", "javaType": "com.azure.messaging.servicebus.models.SubQueue", >> "enum": [ "NONE", "DEAD_LETTER_QUEUE", "TRANSFER_DEAD_LETTER_QUEUE" ], >> "deprecated": false, "autowired": false, "secret": false, >> "configurationClass": >> "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", >> "configurationField": "configuration", "description": "Sets the [...] >>> -"subscriptionName": { "kind": "property", "displayName": >> "Subscription Name", "group": "consumer", "label": "consumer", "required": >> false, "type": "string", "javaType": "java.lang.String", "deprecated": >> false, "autowired": false, "secret": false, "configurationClass": >> "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", >> "configurationField": "configuration", "description": "Sets the name of the >> subscription in the topic to listen to. topicOrQueueName and serviceBusT >> [...] >>> +"subscriptionName": { "kind": "property", "displayName": >> "Subscription Name", "group": "consumer", "label": "consumer", "required": >> true, "type": "string", "javaType": "java.lang.String", "deprecated": >> false, "deprecationNote": "", "autowired": false, "secret": false, >> "configurationClass": >> "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", >> "configurationField": "configuration", "description": "Sets the name of the >> subscription in the topic to listen to. topicOrQue [...] >>> "lazyStartProducer": { "kind": "property", "displayName": "Lazy >> Start Producer", "group": "producer", "label": "producer", "required": >> false, "type":
Re: [camel] 01/01: azure-servicebus subscriptionName is required by it's consumer
On Mon, Mar 28, 2022 at 11:28 AM Andrea Cosentino wrote: > > Also, If you use a queue and not a topic, the subscriptionName is not > mandatory. > > I think we should revert this. > +1 Also it would be good to have a JIRA ticket about such a change the next time, so we can track this - end users can see the JIRA changes. There may be that the subscription name must be checked for != null in the code to report a better failure etc. > Il giorno lun 28 mar 2022 alle ore 08:59 Claus Ibsen > ha scritto: > > > Hi Babak > > > > Did you consider that the producer may not require this parameter? And > > if so then it cannot be marked as required. > > You can only add this in its documentation, and have some code that > > checks when creating the consumer that the option is present. > > > > It's a limitation with @UriParam that we cannot mark things as > > required only for consumer vs producer. > > > > On Mon, Mar 28, 2022 at 1:07 AM wrote: > > > > > > This is an automated email from the ASF dual-hosted git repository. > > > > > > bvahdat pushed a commit to branch azure-servicebus-subscriptionName > > > in repository https://gitbox.apache.org/repos/asf/camel.git > > > > > > commit 334f1c3e8d3aeef287548f168379e7c62da975b6 > > > Author: Babak Vahdat > > > AuthorDate: Mon Mar 28 01:04:57 2022 +0200 > > > > > > azure-servicebus subscriptionName is required by it's consumer > > > --- > > > .../org/apache/camel/catalog/components/azure-servicebus.json | > > 4 ++-- > > > .../org/apache/camel/component/azure/servicebus/azure-servicebus.json | > > 4 ++-- > > > .../camel/component/azure/servicebus/ServiceBusConfiguration.java | > > 1 + > > > .../camel/builder/endpoint/dsl/ServiceBusEndpointBuilderFactory.java | > > 1 + > > > 4 files changed, 6 insertions(+), 4 deletions(-) > > > > > > diff --git > > a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > > b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > > > index bb91029..a20b0e5 100644 > > > --- > > a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > > > +++ > > b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > > > @@ -37,7 +37,7 @@ > > > "receiverAsyncClient": { "kind": "property", "displayName": > > "Receiver Async Client", "group": "consumer", "label": "consumer", > > "required": false, "type": "object", "javaType": > > "com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient", > > "deprecated": false, "deprecationNote": "", "autowired": true, "secret": > > false, "configurationClass": > > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > > "configurationField": "configuration", "description": "Sets the receiverAsy > > [...] > > > "serviceBusReceiveMode": { "kind": "property", "displayName": > > "Service Bus Receive Mode", "group": "consumer", "label": "consumer", > > "required": false, "type": "object", "javaType": > > "com.azure.messaging.servicebus.models.ServiceBusReceiveMode", "enum": [ > > "PEEK_LOCK", "RECEIVE_AND_DELETE" ], "deprecated": false, "autowired": > > false, "secret": false, "defaultValue": "PEEK_LOCK", "configurationClass": > > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > > "configurationFie [...] > > > "subQueue": { "kind": "property", "displayName": "Sub Queue", > > "group": "consumer", "label": "consumer", "required": false, "type": > > "object", "javaType": "com.azure.messaging.servicebus.models.SubQueue", > > "enum": [ "NONE", "DEAD_LETTER_QUEUE", "TRANSFER_DEAD_LETTER_QUEUE" ], > > "deprecated": false, "autowired": false, "secret": false, > > "configurationClass": > > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > > "configurationField": "configuration", "description": "Sets the [...] > > > -"subscriptionName": { "kind": "property", "displayName": > > "Subscription Name", "group": "consumer", "label": "consumer", "required": > > false, "type": "string", "javaType": "java.lang.String", "deprecated": > > false, "autowired": false, "secret": false, "configurationClass": > > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > > "configurationField": "configuration", "description": "Sets the name of the > > subscription in the topic to listen to. topicOrQueueName and serviceBusT > > [...] > > > +"subscriptionName": { "kind": "property", "displayName": > > "Subscription Name", "group": "consumer", "label": "consumer", "required": > > true, "type": "string", "javaType": "java.lang.String", "deprecated": > > false, "deprecationNote": "", "autowired": false, "secret": false, > > "configurationClass": > > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > > "configurationField": "configuration", "description": "Sets the name of the > > subscription in the topic
Re: [camel] 01/01: azure-servicebus subscriptionName is required by it's consumer
Also, If you use a queue and not a topic, the subscriptionName is not mandatory. I think we should revert this. Il giorno lun 28 mar 2022 alle ore 08:59 Claus Ibsen ha scritto: > Hi Babak > > Did you consider that the producer may not require this parameter? And > if so then it cannot be marked as required. > You can only add this in its documentation, and have some code that > checks when creating the consumer that the option is present. > > It's a limitation with @UriParam that we cannot mark things as > required only for consumer vs producer. > > On Mon, Mar 28, 2022 at 1:07 AM wrote: > > > > This is an automated email from the ASF dual-hosted git repository. > > > > bvahdat pushed a commit to branch azure-servicebus-subscriptionName > > in repository https://gitbox.apache.org/repos/asf/camel.git > > > > commit 334f1c3e8d3aeef287548f168379e7c62da975b6 > > Author: Babak Vahdat > > AuthorDate: Mon Mar 28 01:04:57 2022 +0200 > > > > azure-servicebus subscriptionName is required by it's consumer > > --- > > .../org/apache/camel/catalog/components/azure-servicebus.json | > 4 ++-- > > .../org/apache/camel/component/azure/servicebus/azure-servicebus.json | > 4 ++-- > > .../camel/component/azure/servicebus/ServiceBusConfiguration.java | > 1 + > > .../camel/builder/endpoint/dsl/ServiceBusEndpointBuilderFactory.java | > 1 + > > 4 files changed, 6 insertions(+), 4 deletions(-) > > > > diff --git > a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > > index bb91029..a20b0e5 100644 > > --- > a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > > +++ > b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > > @@ -37,7 +37,7 @@ > > "receiverAsyncClient": { "kind": "property", "displayName": > "Receiver Async Client", "group": "consumer", "label": "consumer", > "required": false, "type": "object", "javaType": > "com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient", > "deprecated": false, "deprecationNote": "", "autowired": true, "secret": > false, "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationField": "configuration", "description": "Sets the receiverAsy > [...] > > "serviceBusReceiveMode": { "kind": "property", "displayName": > "Service Bus Receive Mode", "group": "consumer", "label": "consumer", > "required": false, "type": "object", "javaType": > "com.azure.messaging.servicebus.models.ServiceBusReceiveMode", "enum": [ > "PEEK_LOCK", "RECEIVE_AND_DELETE" ], "deprecated": false, "autowired": > false, "secret": false, "defaultValue": "PEEK_LOCK", "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationFie [...] > > "subQueue": { "kind": "property", "displayName": "Sub Queue", > "group": "consumer", "label": "consumer", "required": false, "type": > "object", "javaType": "com.azure.messaging.servicebus.models.SubQueue", > "enum": [ "NONE", "DEAD_LETTER_QUEUE", "TRANSFER_DEAD_LETTER_QUEUE" ], > "deprecated": false, "autowired": false, "secret": false, > "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationField": "configuration", "description": "Sets the [...] > > -"subscriptionName": { "kind": "property", "displayName": > "Subscription Name", "group": "consumer", "label": "consumer", "required": > false, "type": "string", "javaType": "java.lang.String", "deprecated": > false, "autowired": false, "secret": false, "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationField": "configuration", "description": "Sets the name of the > subscription in the topic to listen to. topicOrQueueName and serviceBusT > [...] > > +"subscriptionName": { "kind": "property", "displayName": > "Subscription Name", "group": "consumer", "label": "consumer", "required": > true, "type": "string", "javaType": "java.lang.String", "deprecated": > false, "deprecationNote": "", "autowired": false, "secret": false, > "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationField": "configuration", "description": "Sets the name of the > subscription in the topic to listen to. topicOrQue [...] > > "lazyStartProducer": { "kind": "property", "displayName": "Lazy > Start Producer", "group": "producer", "label": "producer", "required": > false, "type": "boolean", "javaType": "boolean", "deprecated": false, > "autowired": false, "secret": false, "defaultValue": false, "description": > "Whether the producer should be started lazy (on the first message). By > starting lazy you can use this to allow CamelContext and routes to startup > in situations
Re: [camel] 01/01: azure-servicebus subscriptionName is required by it's consumer
Hi Babak Did you consider that the producer may not require this parameter? And if so then it cannot be marked as required. You can only add this in its documentation, and have some code that checks when creating the consumer that the option is present. It's a limitation with @UriParam that we cannot mark things as required only for consumer vs producer. On Mon, Mar 28, 2022 at 1:07 AM wrote: > > This is an automated email from the ASF dual-hosted git repository. > > bvahdat pushed a commit to branch azure-servicebus-subscriptionName > in repository https://gitbox.apache.org/repos/asf/camel.git > > commit 334f1c3e8d3aeef287548f168379e7c62da975b6 > Author: Babak Vahdat > AuthorDate: Mon Mar 28 01:04:57 2022 +0200 > > azure-servicebus subscriptionName is required by it's consumer > --- > .../org/apache/camel/catalog/components/azure-servicebus.json | 4 > ++-- > .../org/apache/camel/component/azure/servicebus/azure-servicebus.json | 4 > ++-- > .../camel/component/azure/servicebus/ServiceBusConfiguration.java | 1 + > .../camel/builder/endpoint/dsl/ServiceBusEndpointBuilderFactory.java | 1 + > 4 files changed, 6 insertions(+), 4 deletions(-) > > diff --git > a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > > b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > index bb91029..a20b0e5 100644 > --- > a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > +++ > b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-servicebus.json > @@ -37,7 +37,7 @@ > "receiverAsyncClient": { "kind": "property", "displayName": "Receiver > Async Client", "group": "consumer", "label": "consumer", "required": false, > "type": "object", "javaType": > "com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient", "deprecated": > false, "deprecationNote": "", "autowired": true, "secret": false, > "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationField": "configuration", "description": "Sets the receiverAsy > [...] > "serviceBusReceiveMode": { "kind": "property", "displayName": "Service > Bus Receive Mode", "group": "consumer", "label": "consumer", "required": > false, "type": "object", "javaType": > "com.azure.messaging.servicebus.models.ServiceBusReceiveMode", "enum": [ > "PEEK_LOCK", "RECEIVE_AND_DELETE" ], "deprecated": false, "autowired": false, > "secret": false, "defaultValue": "PEEK_LOCK", "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationFie [...] > "subQueue": { "kind": "property", "displayName": "Sub Queue", "group": > "consumer", "label": "consumer", "required": false, "type": "object", > "javaType": "com.azure.messaging.servicebus.models.SubQueue", "enum": [ > "NONE", "DEAD_LETTER_QUEUE", "TRANSFER_DEAD_LETTER_QUEUE" ], "deprecated": > false, "autowired": false, "secret": false, "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationField": "configuration", "description": "Sets the [...] > -"subscriptionName": { "kind": "property", "displayName": "Subscription > Name", "group": "consumer", "label": "consumer", "required": false, "type": > "string", "javaType": "java.lang.String", "deprecated": false, "autowired": > false, "secret": false, "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationField": "configuration", "description": "Sets the name of the > subscription in the topic to listen to. topicOrQueueName and serviceBusT [...] > +"subscriptionName": { "kind": "property", "displayName": "Subscription > Name", "group": "consumer", "label": "consumer", "required": true, "type": > "string", "javaType": "java.lang.String", "deprecated": false, > "deprecationNote": "", "autowired": false, "secret": false, > "configurationClass": > "org.apache.camel.component.azure.servicebus.ServiceBusConfiguration", > "configurationField": "configuration", "description": "Sets the name of the > subscription in the topic to listen to. topicOrQue [...] > "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start > Producer", "group": "producer", "label": "producer", "required": false, > "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": > false, "secret": false, "defaultValue": false, "description": "Whether the > producer should be started lazy (on the first message). By starting lazy you > can use this to allow CamelContext and routes to startup in situations where > a producer may otherwise fail during star [...] > "producerOperation": { "kind": "property", "displayName": "Producer > Operation", "group": "producer", "label": "producer", "required": false, > "type":