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

0 votes
Accepted answer

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
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,169 views 20 14
Join discussion

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