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 NATS backend #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add NATS backend #21

wants to merge 2 commits into from

Conversation

MarcDufresne
Copy link

This PR adds support for NATS, it supports the publish/subscribe feature of NATS only.

Let me know what you think of it and if any changes might be necessary.

Cheers

async def unsubscribe(self, channel: str) -> None:
ssid = self._channel_ssids.get(channel)
if ssid is not None:
await self._nc.unsubscribe(ssid)
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Does this method exists?

async def publish(self, channel: str, message: str) -> None:
await self._nc.publish(channel, message.encode())

async def message_handler(self, message) -> None:
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Suggested change
async def message_handler(self, message) -> None:
async def _message_handler(self, message: <?>) -> None:

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.

None yet

2 participants