Skip to content
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

bug: reading in batch mode not work properly #487

Open
a-tsarenko opened this issue Sep 18, 2024 · 0 comments
Open

bug: reading in batch mode not work properly #487

a-tsarenko opened this issue Sep 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@a-tsarenko
Copy link

Bug Report

YDB Python SDK version:

ydb==3.17.2

Environment

Ubuntu 22.04, Python 3.11.7, x86_64

Current behavior:

When i read messages from topic in batch mode, i expect got 1+ messages, got only 1 every time

Expected behavior:

When i read messages from topic in batch mode, i got more than 1 message

Related code:

    async def _consume(self, reader: ydb.TopicReaderAsyncIO) -> None:
        while True:
            try:
                batch = await reader.receive_batch()
                if not batch:
                    await asyncio.sleep(1)
                    continue

            except TimeoutError as e:
                self.__logger.info('Error while receiving batch: %e ', e)
                continue

            for message in batch.messages:  #  <== got only 1 message here every time
                try:
                     ....  # processing
@a-tsarenko a-tsarenko added the bug Something isn't working label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant