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

This widget could not be displayed.

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 Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

342 views 2 5
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