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

DeliveredMessage.reply_to doesn't exist #112

Open
matthewtrotter opened this issue Jun 16, 2021 · 0 comments
Open

DeliveredMessage.reply_to doesn't exist #112

matthewtrotter opened this issue Jun 16, 2021 · 0 comments

Comments

@matthewtrotter
Copy link

In an RPC framework, the server cannot access the reply_to variable of the message. It doesn't seem to exist, or I can't find it.

Server code:

# Setup/connect
await self.chan.queue_declare(self.requests_queue)
await self.chan.basic_consume(self.requests_queue, self._process_request)

async def _process_request(self, request):
    # Do stuff

    # Respond
    await request.channel.basic_publish(
        body=response_bin, 
        routing_key=request.reply_to,
        properties=aiormq.spec.Basic.Properties(
            correlation_id=request.correlation_id
        )
    )

Error:

AttributeError: 'DeliveredMessage' object has no attribute 'reply_to'
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

No branches or pull requests

1 participant