diff --git a/docs/getting-started/examples.html b/docs/getting-started/examples.html index 0986c5df..ea001eff 100644 --- a/docs/getting-started/examples.html +++ b/docs/getting-started/examples.html @@ -204,4 +204,31 @@ apps << PV("pv") << StorageClass("sc")

stateful architecture diagram

-
Last updated on 2020-2-7
InstallationDiagrams
\ No newline at end of file +

RabbitMQ Consumers with custom nodes

+
from urllib.request import urlretrieve
+
+from diagrams import Cluster, Diagram
+from diagrams.custom import Custom
+from diagrams.aws.database import Aurora
+from diagrams.k8s.compute import Pod
+
+# Download an image to be used into a Custom Node class
+rabbitmq_url = "https://jpadilla.github.io/rabbitmqapp/assets/img/icon.png"
+rabbitmq_icon = "rabbitmq.png"
+urlretrieve(rabbitmq_url, rabbitmq_icon)
+
+
+with Diagram("Broker Consumers", show=False):
+    with Cluster("Consumers"):
+        consumers = [
+            Pod("worker"),
+            Pod("worker"),
+            Pod("worker")
+        ]
+
+    queue = Custom("Message queue", rabbitmq_icon)
+
+    queue >> consumers >> Aurora("Database")
+
+

rabbitmq consumers diagram

+
Last updated on 2020-2-19
InstallationDiagrams
\ No newline at end of file diff --git a/docs/getting-started/examples/index.html b/docs/getting-started/examples/index.html index 0986c5df..ea001eff 100644 --- a/docs/getting-started/examples/index.html +++ b/docs/getting-started/examples/index.html @@ -204,4 +204,31 @@ apps << PV("pv") << StorageClass("sc")

stateful architecture diagram

-
Last updated on 2020-2-7
InstallationDiagrams
\ No newline at end of file +

RabbitMQ Consumers with custom nodes

+
from urllib.request import urlretrieve
+
+from diagrams import Cluster, Diagram
+from diagrams.custom import Custom
+from diagrams.aws.database import Aurora
+from diagrams.k8s.compute import Pod
+
+# Download an image to be used into a Custom Node class
+rabbitmq_url = "https://jpadilla.github.io/rabbitmqapp/assets/img/icon.png"
+rabbitmq_icon = "rabbitmq.png"
+urlretrieve(rabbitmq_url, rabbitmq_icon)
+
+
+with Diagram("Broker Consumers", show=False):
+    with Cluster("Consumers"):
+        consumers = [
+            Pod("worker"),
+            Pod("worker"),
+            Pod("worker")
+        ]
+
+    queue = Custom("Message queue", rabbitmq_icon)
+
+    queue >> consumers >> Aurora("Database")
+
+

rabbitmq consumers diagram

+
Last updated on 2020-2-19
InstallationDiagrams
\ No newline at end of file diff --git a/img/rabbitmq_consumers_diagram.png b/img/rabbitmq_consumers_diagram.png new file mode 100644 index 00000000..a166749d Binary files /dev/null and b/img/rabbitmq_consumers_diagram.png differ