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

Handle Subscribe/Unsubscribe response messages #291

Open
cristian-com opened this issue May 2, 2021 · 0 comments
Open

Handle Subscribe/Unsubscribe response messages #291

cristian-com opened this issue May 2, 2021 · 0 comments

Comments

@cristian-com
Copy link

cristian-com commented May 2, 2021

Describe the feature

Other kind of messages apart from "message" are not being handled by default. Currently only "messages" are being sent as Json objects to the even bus, for others a warning message is being printed. e.g: WARNING: No handler waiting for message: [subscribe, channel, 1]

Unless this is the expected behaviour I think all kind of messages should be handled in the same way.

All kind of responses are described here

Format of pushed messages
A message is a Array reply with three elements.

The first element is the kind of message:

subscribe: means that we successfully subscribed to the channel given as the second element in the reply. The third argument represents the number of channels we are currently subscribed to.

unsubscribe: means that we successfully unsubscribed from the channel given as second element in the reply. The third argument represents the number of channels we are currently subscribed to. When the last argument is zero, we are no longer subscribed to any channel, and the client can issue any kind of Redis command as we are outside the Pub/Sub state.

message: it is a message received as result of a PUBLISH command issued by another client. The second element is the name of the originating channel, and the third argument is the actual message payload.

Use cases

A list of use cases this feature will enable and the value it creates.

Contribution

I would be happy to add a pr, please check this commit: cristian-com@47a5b1a

If you consider the above applies I will make it look nicer in a private method and handle the missing cases for unsubscribe responses .

This issue was originally mentioned at: quarkusio/quarkus#13887 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant