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

Add unit test for queue consumer #3

Merged
merged 2 commits into from
Jun 7, 2024
Merged

Add unit test for queue consumer #3

merged 2 commits into from
Jun 7, 2024

Conversation

nerdai
Copy link
Contributor

@nerdai nerdai commented Jun 7, 2024

No description provided.

task = asyncio.create_task(mq.start())

# Act
await consumer_one.start_consuming(message_queue=mq)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@logan-markewich thoughts on this?

I kinda feel like its redundant, but I know RabbitMQ has something like this where you define a consumer and you can start consuming from it as well.

I say its redundant cause you can do this from the message queue side using mq.register_consumer() (in fact that's what's being called here under the hood in consumer.start_consuming(mq).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yea, I guess is there a use case for having both directions (i.e. register vs explicitly calling start_consuming)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping it for now then lol

@nerdai nerdai merged commit d81ab33 into main Jun 7, 2024
4 of 5 checks passed
@nerdai nerdai deleted the nerdai/test-consumer branch June 7, 2024 22:06
nerdai added a commit that referenced this pull request Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants