bug(sdk): HTTP API can not handle digit only stream names
Maintainers usually reply within 2 days
@haubur is already working on this.
Since Sep 23, 2026.
Assessment
This issue has not been assessed yet.
Description
Bug description
Relates to #4155 and discussed in #4249
Situation
On HTTP transport sending Identifiers does not carry IdKind info.
Problem
The HTTP client sends ids through as_cow_str(), and the server parses path ids with from_str_value(), which tries u32 first. A digit-only name is then interpreted as an id instead of a name, which e.g binds consumers to no stream (not found) or another stream (with that id).
Solution
The HTTP API needs a way to differentiate between IdKinds (numeric and string).
Currently failing integration tests here.
Affected area / component
Rust SDK
Deployment
None
Versions
No response
Hardware / environment
No response
Sample code
No response
Logs
No response
Iggy server config
No response
Reproduction
Three integration tests here
One example pasted for convenience:
use iggy::prelude::*;
use integration::iggy_harness;
const DIGITS_ONLY_NAME: &str = "424242";
#[iggy_harness(test_client_transport = [Tcp, Http])]
async fn given_digit_only_stream_name_when_getting_the_stream_should_resolve_it_by_name(
harness: &TestHarness,
) {
let client = harness.root_client().await.unwrap();
let created = client.create_stream(DIGITS_ONLY_NAME).await.unwrap();
let stream_id = Identifier::named(DIGITS_ONLY_NAME).unwrap();
// Should get the correct stream by casting the name into an Identifier.
// If it fails, the server casts the the digit only name into an Identifier with IdKind::Numeric
// and looks for that id rather the name.
let fetched = client
.get_stream(&stream_id)
.await
.unwrap()
.unwrap_or_else(|| {
panic!(
"stream named {DIGITS_ONLY_NAME} must resolve by name, \
not as id {DIGITS_ONLY_NAME}"
)
});
assert_eq!(fetched.name, DIGITS_ONLY_NAME);
assert_eq!(fetched.id, created.id);
}
Contribution
- I'm willing to submit a pull request to fix this bug
Good first issue
- I think this could be a good first issue for a new contributor
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 548
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 194
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iggy
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
good first issue java test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
good first issue javascript test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
Similar issues
-
bug triaged tui ux wontfix
Difficulty 2/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
bevyengine/bevy#26642 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day