Is this an error with rusoto_kinesis or am I just missing something

Hello All

I am using an enhanced consumer to subscribe to a shard in kinesis using the subscribe_to_shard method found in the rusoto_kinesis crate which returns an EventStream<rusoto_kinesis::SubscribeToShardEventStreamItem> I have been using a while let Some(item) = subscription.next().await { which returns a Result<SubscribeToShardEvent,RusotoError>

This has worked fine for a length of time but after re-sharding the stream it just returns a RusotoError::ParseError as they payload it recives serializes into a ChildShard whilst it is expecting a SubscribeToShardEvent which usually contains ChildShard as a field. I could use that ChildShard object to subscribe to the newly created shard, which is how it should work, but I can't get at that object because the moment I call next() on the event stream I just recive the error.

I have raised an issue on rusoto's GitHub but thought I'd also ask here to check that I haven't missed something and to confirm that the expected behaviour would be that after a re-shard I would receive a SubscribeToShardEvent containing a ChildShard object that I could use to subscribe to the newly created shard.

Thanks in advance

Rich

Looks like a service bug! The Javascript v2 SDK service schema (often used as a reference for other language implementations) doesn't even include SubscribeToShard in it's list of operations (despite other operations mentioning it), but the java v2 one does, the operation output type is defined here: aws-sdk-java-v2/service-2.json at 4289e9a98c8db6b25643c40c9e77fdae6af1d5d5 · aws/aws-sdk-java-v2 · GitHub - and the referenced shapes don't offer the option for the response to not be wrapped, agreeing with the docs. Seems like if this is a bad service response it would be broken on Java too. Might be worth putting together a reproduction in that to verify if it's a service or client issue, and raise it with AWS if so.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.