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 Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,439 views 110 8
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