Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    xiaoxiunique
    @xiaoxiunique
    It is not possible to connect directly with the main.go index.html on the official website.
    1 reply
    image.png
    Artyom Zavrazhyn
    @Zavrik94
    @FZambia Hello. Is it possible to set up Authorization header and Cookie to websocket connection, and using proxy redirect connection to backend with this headers for Backend Auth?
    1 reply
    Ryan Mills
    @rm14_gitlab
    Hey guys, quick question here. I have an issue with centrifugo sometimes 'closing' channels. After a period of time, channels will not be active even if users subscribe to them. I can see that the data is arriving into the correct redis pub/sub channel so it looks like an issue with centrifugo. Has anyone come across something like this before? Its really confusing seeing that other channels work perfectly fine yet some seem to randomly break
    3 replies
    Alexander
    @xenx-efy
    изображение.png
    Hi there. Does anybody know why I receive response from websoket with double data? I checked, request is correct. 👆
    Alexander Emelin
    @FZambia
    @xenx-efy hello, it's a protocol implementation detail, so it's a normal thing and not a bug
    Alexander
    @xenx-efy
    Interesting, thank you for answer)
    Alexander Emelin
    @FZambia
    Welcome, you are not the first asking about this - a bit confusing naming here..
    Pavel Shatalov
    @seidju
    @FZambia Hi! I'm using Swift example with SwiftCentrifugeSDK and I'm curious is there any way to automatically refresh JWT connection token using this SDK (or maybe some config in Centrifugo)? Or I should manually ask my backend to get new token and re-connect to Centrifugo?
    Pavel Shatalov
    @seidju
    Also, should client subscribes to personal channel if Centrifugo configuration already contains user_subscribe_to_personal ?
    Alexander Emelin
    @FZambia
    @seidju hi! swift client contains a callback which is when set called at the time when token should be refreshed - https://github.com/centrifugal/centrifuge-swift/blob/master/Sources/SwiftCentrifuge/Delegate.swift. but the way you will get a new token from backend is up to developer - in most cases you will ask backend over http for token
    Regarding personal channel subscription - that option should be enough, non-anonymous users will be subscribed to a server-side personal channel. By default its #<user_id>
    Alexander Emelin
    @FZambia
    It's also possible to set a namespace for user personal channel
    Junaidy
    @junaidy-johm
    Any tutorial in YouTube about chat app with centrifuge? Thanks
    1 reply
    Pavel Shatalov
    @seidju
    @FZambia Thanks a lot!
    Alexander Emelin
    @FZambia

    Hello! Just released Centrifugo PRO v3.1.0 - this is the first release of PRO version. Don't forget that you can check out all Centrifugo PRO features in sandbox mode – everything is available, just with restrictions on number of connections, API calls and node amount.

    https://github.com/centrifugal/centrifugo-pro/releases/tag/v3.1.0

    Alexander Emelin
    @FZambia
    Hey folks, Centrifugo v3.1.1 released! https://github.com/centrifugal/centrifugo/releases/tag/v3.1.1
    Alexander Emelin
    @FZambia
    Hey folks, me and @anton_silischev just published a post about Centrifugo and Laravel integration. Take a look – feedback is much appreciated, planning to post on Reddit tomorrow: https://centrifugal.dev/blog/2021/12/14/laravel-multi-room-chat-tutorial
    Pavel Shatalov
    @seidju
    Hi @FZambia! Could you please tell is there any way to notify backend when centrifugo client did disconnect from socket? For example, app was in background and ws was stopped. Couldn't find information in docs. Thanks a lot!
    Alexander Emelin
    @FZambia
    Centrifugo v4 roadmap ^^
    Alex Davidovich
    @alxsad
    Hi @FZambia Could you please help me with centrifugo client written in go? There is callback func (h *centrifugoTopicEventHandler) OnPublish(sub *centrifuge.Subscription, e centrifuge.PublishEvent) but on each message from topic e.ClientInfo always is nil. Is it expected behaviour? Thank you.
    @FZambia maybe is there other way to skip messages from topic sent by me?
    Alexander Emelin
    @FZambia
    @alxsad hello! e.ClientInfo is filled when publication issued using client protocol (using client.Publish method). If publication is sent over server API then it's always nil. To skip messages:
    • you can include client ID that sent message into message payload and have skip logic based on it
    • you can include some unique page identifier instead of ID into message payload
    • there is also field Meta in Publication - https://github.com/centrifugal/protocol/blob/master/definitions/client.proto#L134 - it was just recently added, needs some work to support it throughout Centrifugo stack. It will allow including some additional information into Publication which can be outside of actual Payload
    • you can also make sure that message processing is idempotent - i.e. processing message twice does not lead to side effects in your app
    Alex Davidovich
    @alxsad
    Thank you @FZambia
    zunnar
    @zunnar
    @FZambia Dear Aleksander can you support with error from centrifugo
    zunnar
    @zunnar
    centrifugo | {"level":"error","client":"2d5099ee-a963-4e56-bf29-e3539bcaebf2","error":"HTTP request error: Post \"http://127.0.0.1:8880/chat/centrifugo/connect/\": dial tcp 127.0.0.1:8880: connect: connection refused","time":"2022-02-02T15:43:09Z","message":"error proxying connect"}
    centrifugo | {"level":"info","client":"2d5099ee-a963-4e56-bf29-e3539bcaebf2","code":100,"command":"id:6 params:\"{\\"name\\":\\"js\\"}\"","error":"internal server error","reply":"id:6 error:{code:100 message:\"internal server error\"}","user":"","time":"2022-02-02T15:43:09Z","message":"client command error"}
    http://127.0.0.1:8880 -> server is runnig
    Alexander Emelin
    @FZambia
    @zunnar hello, Centrifugo can't access 127.0.0.1:8880 for some reason. Many such cases happen when developers run Centrifugo in Docker, when running in Docker Centrifugo does not have direct access to services running on host machine.
    zunnar
    @zunnar
    I can't use 127.0.0.1 but what if i use docker created interface ip?!
    Alexander Emelin
    @FZambia
    This should work, maybe your app must run on 0.0.0.0 in this case. You can also try http://host.docker.internal:8880
    zunnar
    @zunnar
    ok thx, i will try
    zunnar
    @zunnar
    Hi @FZambia Could you please help me with below error
    centrifugo | {"level":"error","client":"6d7ab60a-fac5-43fd-9b91-223ab172fa74","error":"unexpected HTTP status code: 400","time":"2022-02-04T08:16:01Z","message":"error proxying connect"}
    centrifugo | {"level":"info","client":"6d7ab60a-fac5-43fd-9b91-223ab172fa74","code":100,"command":"id:10 params:\"{\\"name\\":\\"js\\"}\"","error":"internal server error","reply":"id:10 error:{code:100 message:\"internal server error\"}","user":"","time":"2022-02-04T08:16:01Z","message":"client command error"}
    Alexander Emelin
    @FZambia
    Hi, that 400 is coming from app backend
    Pavel Shatalov
    @seidju
    Hi @FZambia, we faced crashes in SwiftCentrifuge framework, posted an issue at github - centrifugal/centrifuge-swift#61
    ywngr
    @ywngr
    Hi! Is it possible to safely migrate from redis to redis streams without loosing data? =) Im on 2.8.1
    Alexander Emelin
    @FZambia
    @ywngr hi, I don't think so - but loosing data in Redis should not be a problem if you are using Centrifugo in idiomatic way (data should be loaded from main database). Also Centrifugo v3 still provides list support (I suggest testing migration anyway)
    Alexander Emelin
    @FZambia
    livingrockrises
    @livingrockrises
    @furqanharoon were you able to fix this?
    centrifugal/centrifugo#396
    I was told it has to do with https://centrifugal.dev/docs/server/configuration#client_channel_limit
    cc @FZambia
    the problem is in our case we are using an SDK with single sock client messenger which collects updates on all transaction<txId> channels and let the devs know state changes through event emitters.
    can anyone suggest a way to tackle this?
    Alexander Emelin
    @FZambia
    Not 100% sure I understood a problem, but it seems you are trying to listen to all channels with a single client? This does not scale. Centrifugo should be used as a message transport, not a source of messages. I.e. publications should come from the backend where you have all the power to process them in an appropriate way.
    livingrockrises
    @livingrockrises
    for each transaction we have a transaction id and backend needs to send updates as to what happened with it (hash generated, mined, replaced etc). end user uses our sdk only so this single client is written in the sdk which listens to all transaction id channels
    Is there a way to unsubscribe from a channel once client is done? maybe that would solve the problem
    Alexander Emelin
    @FZambia
    Yes, possible to .unsubscribe()