-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aeron archive - Extending recording #23
Comments
@matteo-gsr if you use version let builder = AeronUriStringBuilder::default();
builder.init_new()?;
builder
.media(Media::Udp)? // very important to set media else set_initial_position will give an error of -1
.mtu_length(1024 * 64)?
.set_initial_position(127424949617280, 1182294755, 65536)?;
let uri = builder.build(1024)?;
assert_eq!("aeron:udp?term-id=-1168322114|term-length=65536|mtu=65536|init-term-id=1182294755|term-offset=33408", uri);
builder.init_new()?;
let uri = builder
.media(Media::Udp)?
.control_mode(ControlMode::Dynamic)?
.reliable(false)?
.ttl(2)?
.endpoint("localhost:1235")?
.control("localhost:1234")?
.build(1024)?;
assert_eq!("aeron:udp?ttl=2|control-mode=dynamic|endpoint=localhost:1235|control=localhost:1234|reliable=false", uri); |
@mimran1980, any chance we can also have the parser? https://github.com/real-logic/aeron/blob/master/aeron-client/src/main/c/uri/aeron_uri.c I have already a channel &str, I just need to parse it, call set_initial_position and that should give me the updated uri. Else, I need to do the parsing myself. |
There is a method called let uri: String = AeronUriStringBuilder::from_str("aeron:udp?endpoint=localhost:8010")?
.ttl(5)?
.build(1024)?;
assert_eq!("aeron:udp?ttl=5|endpoint=localhost:8010", uri);
let uri = uri.parse::<AeronUriStringBuilder>()?
.ttl(6)?
.build(1024)?;
assert_eq!("aeron:udp?ttl=6|endpoint=localhost:8010", uri); Note there is This change is in |
Thanks Mo - it looks like it's unable to extend an existing recording if one has multiple streams on the same channel?
In the second run, it's adjusting the URI based on the existing recording found:
It doesn't happen if I only use one stream id per channel, it seems. |
Opened an issue @ aeron - real-logic/aeron#1719 |
@mimran1980 - looks like it was fixed here. |
When extending an existing recording for an exclusive publication, one needs to add to the exclusive pub channel the following parameters:
from the docs:
if you look at https://github.com/real-logic/aeron/blob/master/aeron-client/src/main/java/io/aeron/ChannelUriStringBuilder.java#L1627, there's some specific logic on how to do it.
there's an equivalent impl in the C client, see aeron_uri_string_builder_set_initial_position. I think it's worth reusing the whole URI builder in the C client and expose that via an idiomatic rust builder?
The text was updated successfully, but these errors were encountered: