Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Service Bus binding into two #134

Closed
fabiocav opened this issue Apr 7, 2016 · 3 comments
Closed

Split Service Bus binding into two #134

fabiocav opened this issue Apr 7, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@fabiocav
Copy link
Member

fabiocav commented Apr 7, 2016

Currently, the service bus binding only exposes a parameter for the queue, and since the portal doesn't have a mechanism to pick between two required parameters, we should split the binding template into two, one for queues (Service Bus Queue) and one for topics (Service Bus Topic)

@christopheranderson christopheranderson added this to the current milestone Apr 8, 2016
@christopheranderson
Copy link
Contributor

So we have two options for changing this:

  1. We add a new "type" to the Script Host for "serviceBusTopic". Mathew doesn't like this and he has a point that we need to support a similar thing for API Hubs eventually. This would require some pretty large script host changes.
  2. We allow for the portal to work off of more than just "type" and "direction" for changing the UX. We could add a "rule" property which lets us set things like "exclusivity" between settings. (and potentially more rules, which I can see coming our way with API Hubs....). This would require some pretty large portal changes.

Thoughts?

Example bindings.json snippet:

{
    "type": "serviceBusTrigger",
    "displayName": "Azure Service Bus",
    "direction": "trigger",
    "defaultParameterName": "myQueueItem",
    "parameterNamePrompt": "Message parameter name",
    "settings": [
        {
            "name": "queueName",
            "value": "string",
            "defaultValue": "samples-input",
            "required": true,
            "label": "Queue name",
            "help": "This is the name of the queue that messages will be read from."
        },
        {
            "name": "topicName",
            "value": "string",
            "defaultValue": "samples-input",
            "required": true,
            "label": "Topic name",
            "help": "This is the name of the queue that messages will be read from."
        },
        {
            "name": "connection",
            "value": "string",
            "resource": "ServiceBus",
            "required": true,
            "label": "Service Bus connection",
            "help": "This is the connection string for your Service Bus account. Make sure that it has Listen rights."
        }
    ],
    "rules": [
        {
            "type": "exclusivity",
            "values": [
                {
                    "value": "queueName",
                    "displayName": "Service Bus Queue"
                },
                {
                    "value": "topicName",
                    "displayName": "Service Bus Topic"
                }
            ],
            "label": "Service Bus message type",
            "help": "This is the type of Servce Bus message. This lets you choose between using Queues or Topics."
        }
    ]
},

@alrod
Copy link
Member

alrod commented Apr 14, 2016

I have some changes in proposed format:

{
"type": "serviceBusTrigger",
"displayName": "Azure Service Bus",
"direction": "trigger",
"defaultParameterName": "myQueueItem",
"settings": [
{
"name": "queueName",
"value": "string",
"defaultValue": "samples-queue",
"required": true,
"label": "Queue name",
"help": "This is the name of the queue that messages will be read from."
},
{
"name": "topicName",
"value": "string",
"defaultValue": "samples-topic",
"required": true,
"label": "Topic name",
"help": "This is the name of the queue that messages will be read from."
},
{
"name": "connection",
"value": "string",
"resource": "ServiceBus",
"required": true,
"label": "Service Bus connection",
"help": "This is the connection string for your Service Bus account. Make sure that it has Listen rights."
}
],
"rules": [
{
"type": "exclusivity",
"values": [
{
"value": "queueName",
"display": "Service Bus Queue",
"hiddenSettings": ["topicName"],
"shownSettings": ["queueName"]
},
{
"value": "topicName",
"display": "Service Bus Topic",
"hiddenSettings": ["queueName"],
"shownSettings": ["topicName"]
}
],
"label": "Service Bus message type",
"help": "This is the type of Servce Bus message. This lets you choose between using Queues or Topics."
}
]
}

@alrod
Copy link
Member

alrod commented Apr 14, 2016

I checked in change in the portal which supports this:
Azure/azure-functions-ux@5e72980

@soninaren soninaren self-assigned this Apr 18, 2016
@ghost ghost locked as resolved and limited conversation to collaborators Jan 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants