I have a C4 container diagram of a system, in which most of the components communicate with MQTT. The MQTT container is SOUP. Is it necessary that I draw the MQTT container or can I simply draw direct relations between containers and state on those, that it works via MQTT? Is there a specific recommandation? If yes, why? See examples below.

Example with broker (relations can easily clutter up with more containers):

with broker

Example with direct relation and more abstraction:

enter image description here

1 Answer 1


This specific case is addressed in the C4 Model Frequently Asked Questions. Both options - showing service A publishing a message to the broker and the broker sending the message to service B is just as valid as omitting the broker and using notions (textual notes, colors, line style, arrow heads, etc.) to show the communication.

Since both options are valid, I would look at the clarity of communicating the system to consumers of the model. My preference would lean toward including the message broker as a component on the diagram, however I would omit it if including it and all the lines necessary to represent connections made the diagram harder to read.

Depending on clarity, you could omit the broker on the container diagram, but include it on the relevant component diagrams, or vice versa. However, you may not be creating component diagrams if they do not add value. You could also consider showing the broker on a supplemental diagram, such as a deployment diagram.

  • Thank you. Spot on answer :)
    – Herr Derb
    Aug 3, 2022 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.