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

Azure storage queue source #334

Merged
merged 4 commits into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions azure-storage-queue-source.kamelet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
name: azure-storage-queue-source
annotations:
camel.apache.org/kamelet.support.level: "Preview"
camel.apache.org/catalog.version: "main-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgOTEgODEiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI0EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9IkEiIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNNzAuMDUzIDM0LjYzNEg1MC41OGw5LjczNiA3LjgwNXptLTM5LjQyIDEwLjQ4OGMtLjIzOCAwLS40NzUgMC0uNzEzLS4yNDRsLTkuMDI0LTcuMzE3djExLjk1MWgyMC42NlYzNy4zMTdsLTkuNzM2IDcuNTYxYy0uNDc1LjI0NC0uOTUuMjQ0LTEuMTg3LjI0NHptMjkuNjgzIDBjLS4yMzggMC0uNzEzIDAtLjc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E3LjgwNXoiIGZpbGw9IiMwMDc4ZDciIHN0cm9rZT0ibm9uZSIvPjwvc3ltYm9sPjwvc3ZnPg=="
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.group: "Azure Storage Queue"
labels:
camel.apache.org/kamelet.type: "source"
spec:
definition:
title: "Azure Storage Queue Source"
description: |-
Receive Messages from Azure Storage queues.
required:
- accountName
- queueName
- accessKey
type: object
properties:
accountName:
title: Account Name
description: The Azure Storage Queue account name.
type: string
queueName:
title: Queue Name
description: The Azure Storage Queue container name.
type: string
accessKey:
title: Access Key
description: The Azure Storage Queue access Key.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
maxMessages:
title: Maximum Messages
description: Maximum number of messages to get, if there are less messages exist in the queue than requested all the messages will be returned. By default it will consider 1 message to be retrieved, the allowed range is 1 to 32 messages.
type: int
default: 1
dependencies:
- "camel:azure-storage-queue"
- "camel:kamelet"
flow:
from:
uri: "azure-storage-queue://{{accountName}}/{{queueName}}"
parameters:
accessKey: "{{accessKey}}"
maxMessages: "{{maxMessages}}"
steps:
- to: "kamelet:sink"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* xref:ROOT:azure-storage-blob-sink.adoc[image:kamelets/azure-storage-blob-sink.svg[] Azure Storage Blob Sink]
* xref:ROOT:azure-storage-blob-source.adoc[image:kamelets/azure-storage-blob-source.svg[] Azure Storage Blob Source]
* xref:ROOT:azure-storage-queue-sink.adoc[image:kamelets/azure-storage-queue-sink.svg[] Azure Storage Queue Sink]
* xref:ROOT:azure-storage-queue-source.adoc[image:kamelets/azure-storage-queue-source.svg[] Azure Storage Queue Source]
* xref:ROOT:bitcoin-source.adoc[image:kamelets/bitcoin-source.svg[] Bitcoin Source]
* xref:ROOT:caffeine-action.adoc[image:kamelets/caffeine-action.svg[] Caffeine Action]
* xref:ROOT:cassandra-sink.adoc[image:kamelets/cassandra-sink.svg[] Cassandra Sink]
Expand Down
67 changes: 67 additions & 0 deletions docs/modules/ROOT/pages/azure-storage-queue-source.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
= image:kamelets/azure-storage-queue-source.svg[] Azure Storage Queue Source

*Provided by: "Apache Software Foundation"*

*Support Level for this Kamelet is: "Preview"*

Receive Messages from Azure Storage queues.

== Configuration Options

The following table summarizes the configuration options available for the `azure-storage-queue-source` Kamelet:
[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
|===
| Property| Name| Description| Type| Default| Example
| *accessKey {empty}* *| Access Key| The Azure Storage Queue access Key.| string| |
| *accountName {empty}* *| Account Name| The Azure Storage Queue account name.| string| |
| *queueName {empty}* *| Queue Name| The Azure Storage Queue container name.| string| |
| maxMessages| Maximum Messages| Maximum number of messages to get, if there are less messages exist in the queue than requested all the messages will be returned. By default it will consider 1 message to be retrieved, the allowed range is 1 to 32 messages.| int| `1`|
|===

NOTE: Fields marked with ({empty}*) are mandatory.

== Usage

This section summarizes how the `azure-storage-queue-source` can be used in various contexts.

=== Knative Source

The `azure-storage-queue-source` Kamelet can be used as Knative source by binding it to a Knative object.

.azure-storage-queue-source-binding.yaml
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: azure-storage-queue-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: azure-storage-queue-source
properties:
accessKey: "The Access Key"
accountName: "The Account Name"
queueName: "The Queue Name"
sink:
ref:
kind: InMemoryChannel
apiVersion: messaging.knative.dev/v1
name: mychannel
----

Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.

Save the `azure-storage-queue-source-binding.yaml` file into your hard drive, then configure it according to your needs.

You can run the source using the following command:

[source,shell]
----
kubectl apply -f azure-storage-queue-source-binding.yaml
----
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
name: azure-storage-queue-source
annotations:
camel.apache.org/kamelet.support.level: "Preview"
camel.apache.org/catalog.version: "main-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgOTEgODEiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI0EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9IkEiIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNNzAuMDUzIDM0LjYzNEg1MC41OGw5LjczNiA3LjgwNXptLTM5LjQyIDEwLjQ4OGMtLjIzOCAwLS40NzUgMC0uNzEzLS4yNDRsLTkuMDI0LTcuMzE3djExLjk1MWgyMC42NlYzNy4zMTdsLTkuNzM2IDcuNTYxYy0uNDc1LjI0NC0uOTUuMjQ0LTEuMTg3LjI0NHptMjkuNjgzIDBjLS4yMzggMC0uNzEzIDAtLjcxMy0uMjQ0bC05LjI2MS03LjMxN3YxMS45NTFoMjAuNjZWMzcuMzE3bC05LjczNiA3LjU2MWMtLjQ3NS4yNDQtLjcxMy4yNDQtLjk1LjI0NHpNNjcuNjc4IDBIMjIuNTU5TDAgNDBsMjIuNTU5IDQwSDY3LjQ0TDkwIDQwIDY3LjY3OCAwem03LjgzNiA1Ny4wNzNIMTQuMDExYy0xLjkgMC0zLjMyNS0xLjcwNy0zLjMyNS0zLjY1OVYyOS4yNjhjMC0xLjk1MSAxLjQyNS0zLjY1OCAzLjMyNS0zLjY1OGg2MS41MDRjLjcxMyAwIDEuOSAwIDkuOTc0IDE1LjYxbC4yMzcuNzMyLS4yMzcuNzMyYy04LjA3NCAxNC4zOS05LjI2MSAxNC4zOS05Ljk3NCAxNC4zOXpNNDAuMzcgMzQuNjM0SDIwLjY2bDkuNzM2IDcuODA1em0tMjYuMzU5LTYuMzQxYy0uNDc1IDAtLjk1LjQ4OC0uOTUuOTc2djI0LjE0NmMwIC40ODguNDc1IDEuMjIuOTUgMS4yMkg3NS4wNGMxLjE4OC0xLjIyIDQuNzQ5LTcuMDczIDcuODM3LTEyLjY4My0zLjA4Ny02LjA5OC02Ljg4Ni0xMi40MzktNy44MzctMTMuNjU5SDE0LjAxMXptMjkuOTIxIDIyLjQzOWMwIC43MzItLjcxMyAxLjQ2My0xLjY2MyAxLjQ2M0gxOC45OThjLS43MTMgMC0uOTUtLjczMi0uOTUtMS40NjNWMzIuOTI3YzAtLjczMi4yMzgtLjk3Ni45NS0uOTc2SDQyLjI3Yy43MTIgMCAxLjY2My4yNDQgMS42NjMuOTc2djE3LjgwNXptMjkuMjA5IDBjMCAuNzMyLS40NzUgMS40NjMtMS4xODggMS40NjNINDguOTE5Yy0uNzEyIDAtMS4xODctLjczMi0xLjE4Ny0xLjQ2M1YzMi45MjdjMC0uNzMyLjQ3NS0uOTc2IDEuMTg3LS45NzZoMjMuMDM0Yy43MTMgMCAxLjE4OC4yNDQgMS4xODguOTc2djE3LjgwNXoiIGZpbGw9IiMwMDc4ZDciIHN0cm9rZT0ibm9uZSIvPjwvc3ltYm9sPjwvc3ZnPg=="
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.group: "Azure Storage Queue"
labels:
camel.apache.org/kamelet.type: "source"
spec:
definition:
title: "Azure Storage Queue Source"
description: |-
Receive Messages from Azure Storage queues.
required:
- accountName
- queueName
- accessKey
type: object
properties:
accountName:
title: Account Name
description: The Azure Storage Queue account name.
type: string
queueName:
title: Queue Name
description: The Azure Storage Queue container name.
type: string
accessKey:
title: Access Key
description: The Azure Storage Queue access Key.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
maxMessages:
title: Maximum Messages
description: Maximum number of messages to get, if there are less messages exist in the queue than requested all the messages will be returned. By default it will consider 1 message to be retrieved, the allowed range is 1 to 32 messages.
type: int
default: 1
dependencies:
- "camel:azure-storage-queue"
- "camel:kamelet"
flow:
from:
uri: "azure-storage-queue://{{accountName}}/{{queueName}}"
parameters:
accessKey: "{{accessKey}}"
maxMessages: "{{maxMessages}}"
steps:
- to: "kamelet:sink"