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

Replacement of registerPubSubChannels to register channels events #104

Open
Elikill58 opened this issue May 23, 2024 · 6 comments
Open

Replacement of registerPubSubChannels to register channels events #104

Elikill58 opened this issue May 23, 2024 · 6 comments
Labels
question Further information is requested

Comments

@Elikill58
Copy link

Your question?

What is the replacement for registerPubSubChannels ? I tried to do it myself with RedisBungeeAPI.getRedisBungeeApi().getJedisPool().getResource() but it seems to block the thread or something.

@Elikill58 Elikill58 added the question Further information is requested label May 23, 2024
@ham1255
Copy link
Member

ham1255 commented May 24, 2024

there is no need to register it its just done automatically for any channel you send

@ham1255
Copy link
Member

ham1255 commented May 24, 2024

eh maybe you didn't close connections and Also don't use JedisPool instead use as UnifiedJedis as an alternative

@Elikill58
Copy link
Author

there is no need to register it its just done automatically for any channel you send

And it's well registering for events ? I just need to send like a fake message to make it registered in reading ?

@ham1255
Copy link
Member

ham1255 commented May 24, 2024

Its done automatically Event will fire just normal no need to send message to register.

@Elikill58
Copy link
Author

This doesn't works. I'm sending something on a channel, and I'm waiting for answer. I can't get it, but while listening on redis-cli, I well see the published content.

Also, methods to get the UnifiedJedis are deprecated.

Finally, this event seems most to say which message are sent from this proxy to others, not the opposite

@ham1255
Copy link
Member

ham1255 commented May 26, 2024

Also, methods to get the UnifiedJedis are deprecated.

see the wiki it has better way https://github.com/ProxioDev/ValioBungee/wiki/API#relocation--access-built-in-unifiedjedis

This doesn't works. I'm sending something on a channel, and I'm waiting for answer. I can't get it, but while listening on redis-cli, I well see the published content.

did you register the listener? because if its not working then internals of redisbungee should be failing since its used for players events etc.

// code used in velocity proxy
@Subscribe
    public void onPubSubMessageEvent(PubSubMessageEvent event) {
        System.out.println("handling: " + event.getChannel());
        handlePubSubMessageEvent(event);
    }
[22:00:49 INFO]: handling: redisbungee-player-join
[22:00:49 INFO]: handling: redisbungee-player-join
[22:00:49 INFO]: handling: redisbungee-serverchange
[22:00:49 INFO]: handling: redisbungee-serverchange

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants