Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Cannot publish presence when having databaseConfig.redis.keyPrefix #537

Open
@hcw12889

Description

@hcw12889

I am working on multiple Laravel projects, denoted as "Project A" and "Project B".

I run laravel-echo-server for both projects.
Port 6001 for Project A
Port 6003 for Project B
Both have "databaseConfig.redis.publishPresence" enabled.

Authentication, joining and leaving channel, and Broadcasting (using Queue of Laravel) work totally fine.

However, whenever a user joins the echo server of Project A, both Project A and Project B show a "PresenceChannelUpdated" message (which I only want presence publishing from Project A solely), vice versa.

Channel: PresenceChannelUpdated
Event: [object Object]

To prevent this problem, I added keyPrefix to databaseConfig.redis for Project B.

"databaseConfig": {
"redis": {
"keyPrefix": "ProjectB_"
},
"publishPresence": true
},

Then the echo-server does not publish presence anymore, same case for Project A.

Without databaseConfig.redis.keyPrefix, it works totally fine.

Screenshot 2020-08-07 at 4 17 43 AM

With the keyPrefix, the echo-server doesn't publish presence anymore.

Screenshot 2020-08-07 at 4 19 52 AM

I also tried to use Redis database (e.g. db 0 for Project A, db 2 for Project B), but no luck with it.

Is this a bug or I am doing wrong? Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions