Skip to content

Instantly share code, notes, and snippets.

@lbradstreet
Last active March 28, 2016 14:22
Show Gist options
  • Save lbradstreet/a6e389cfa70f4a37675a to your computer and use it in GitHub Desktop.
Save lbradstreet/a6e389cfa70f4a37675a to your computer and use it in GitHub Desktop.
Aeron Publications and Subscribers
Two media drivers are launched:
m1 on 192.168.0.1, m2 on 192.168.0.2
One subscriber is added via addSubscription:
Media driver m2 channel "udp://192.168.0.2:42000" stream 1
Three publications are added via addPublication:
Publication 1 on m1 channel "udp://192.168.0.2:42000" stream 1
Media driver m1 creates a publication termBuffer on 192.168.0.1 host
Publication 2 on m1 channel "udp://192.168.0.2:42000" stream 1
Publication 1 is returned without creating a termBuffer.
Publication 3 on m2 channel "udp://192.168.0.2:42000" stream 1
Media driver m2 creates a publication termBuffer on 192.167.0.2 host
Operation:
When publication P1 is established, a publication logbuffer will be created for it on media driver m1.
P2 (copy of P1) will share this logbuffer.
When publication P3 is established, a publication logbuffer will be created for it on media driver m2.
Two image logbuffers will be created on m2, corresponding to publications P1 and P3. The subscriber will read over both images, providing a unified view of the both.
If P1 fills the logbuffer on m2, P3 will be able to continue to successfully offer until its logbuffer is filled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment