confluence graphviz bug

The following code produces an extra node that is unconnected ...

digraph kafka {
  node [shape=rect, style=filled, fillcolor=lightyellow, fontname=Verdana, fontsize=9, arrowsize=0.8 label="producer"];
  producer1 producer2 producer3;
  node [label=consumer];
  consumer1 comsumer2 consumer3;
  kafka [label="kafka cluster"];
  edge [label=" topic ", fontsize="8"];
  producer1 -> kafka; producer2 -> kafka; producer3 -> kafka;
  edge [label=" msg "];
  kafka -> consumer1; kafka -> consumer2; kafka -> consumer3; 
}

The image I was trying to reproduce using GraphViz is the one at:

http://kafka.apache.org/images/producer_consumer.png

All I am adding to that image is some extra formatting and edge labels ... but I get an extra node with label "consumer" unconnected to the rest of the graph.

1 answer

1 accepted

The following works ...

digraph G {
  node [shape=rect, fontsize=9, arrowsize=0.8]
  kafka [label="kafka cluster"]
  producer1 [label=producer] producer2 [label=producer] producer3 [label=producer]
  consumer1 [label=consumer] consumer2 [label=consumer] consumer3 [label=consumer]
  edge [label=" topic" fontsize=8]
  producer1 -> kafka; producer2 -> kafka; producer3 -> kafka;
  edge [label=" msg"]
  kafka -> consumer1; kafka -> consumer2; kafka -> consumer3;
}

So looks like you have to specify he labels for all nodes explicitly or it creates a phantom node

Or

node [shape=rect, style=filled, fillcolor=lightyellow, fontname=Verdana, fontsize=9, arrowsize=0.8 label="producer"];
producer1 producer2 producer3;

consumer1 [label="consumer"];
consumer2 [label="consumer"];
consumer3 [label="consumer"];

kafka [label="kafka cluster"];
edge [label=" topic ", fontsize="8"];
producer1 -> kafka; producer2 -> kafka; producer3 -> kafka;

edge [label=" msg "];
kafka -> consumer1; kafka -> consumer2; kafka -> consumer3;

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Color tables for a shiny Confluence page

...; ## Developed by: Alana Fernando ## Shared with love ## @param style:title=style type|type=enum|required=true|desc=Choose a style.|enumValues=Style1,Style2,Style3,Style4,Style5 ## @param alignment:title...

348 views 16 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you