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

feat (#1431): add Response class #1481

Merged
merged 3 commits into from
May 29, 2024
Merged

feat (#1431): add Response class #1481

merged 3 commits into from
May 29, 2024

Conversation

Lancetnik
Copy link
Member

@Lancetnik Lancetnik commented May 28, 2024

Description

Now you can return Response class to set more specific outgoing message parameters:

from faststream import Response

@broker.subscriber("in")
@broker.subscriber("out")
async def handler():
    return Response(body=b"", headers={})

Close #1431, fix #1480

Type of change

Please delete options that are not relevant.

  • Documentation (typos, code examples, or any documentation updates)
  • Bug fix (a non-breaking change that resolves an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would disrupt existing functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to the style guidelines of this project (scripts/lint.sh shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running scripts/test-cov.sh
  • I have ensured that static analysis tests are passing by running scripts/static-analysis.sh
  • I have included code examples to illustrate the modifications

@Lancetnik Lancetnik added enhancement New feature or request Core Issues related to core FastStream functionality and affects to all brokers labels May 28, 2024
davorrunje
davorrunje previously approved these changes May 28, 2024
@Lancetnik Lancetnik added this pull request to the merge queue May 29, 2024
Merged via the queue into main with commit 031fd31 May 29, 2024
31 checks passed
@Lancetnik Lancetnik deleted the feat/add-response branch May 29, 2024 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issues related to core FastStream functionality and affects to all brokers enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bug: fake consumer doesn't account for routing key Feature: add Response class
3 participants